Merge "Remove last of assertEquals"
This commit is contained in:
commit
ed7ee9d995
@ -589,14 +589,14 @@ class TestNiciraL3NatTestCase(test_l3_plugin.L3NatDBTestCase,
|
||||
device_owner='network:dhcp'):
|
||||
subnets = self._list('subnets')['subnets']
|
||||
self.assertEqual(len(subnets), 1)
|
||||
self.assertEquals(subnets[0]['host_routes'][0]['nexthop'],
|
||||
'10.0.0.2')
|
||||
self.assertEquals(subnets[0]['host_routes'][0]['destination'],
|
||||
'169.254.169.254/32')
|
||||
self.assertEqual(subnets[0]['host_routes'][0]['nexthop'],
|
||||
'10.0.0.2')
|
||||
self.assertEqual(subnets[0]['host_routes'][0]['destination'],
|
||||
'169.254.169.254/32')
|
||||
|
||||
subnets = self._list('subnets')['subnets']
|
||||
# Test that route is deleted after dhcp port is removed
|
||||
self.assertEquals(len(subnets[0]['host_routes']), 0)
|
||||
self.assertEqual(len(subnets[0]['host_routes']), 0)
|
||||
|
||||
def test_floatingip_disassociate(self):
|
||||
with self.port() as p:
|
||||
|
@ -233,10 +233,10 @@ class TunnelAllocationsTest(base.BaseTestCase):
|
||||
def test_add_tunnel_endpoints(self):
|
||||
tun_1 = ovs_db_v2.add_tunnel_endpoint('192.168.0.1')
|
||||
tun_2 = ovs_db_v2.add_tunnel_endpoint('192.168.0.2')
|
||||
self.assertEquals(1, tun_1.id)
|
||||
self.assertEquals('192.168.0.1', tun_1.ip_address)
|
||||
self.assertEquals(2, tun_2.id)
|
||||
self.assertEquals('192.168.0.2', tun_2.ip_address)
|
||||
self.assertEqual(1, tun_1.id)
|
||||
self.assertEqual('192.168.0.1', tun_1.ip_address)
|
||||
self.assertEqual(2, tun_2.id)
|
||||
self.assertEqual('192.168.0.2', tun_2.ip_address)
|
||||
|
||||
def test_specific_tunnel_inside_pool(self):
|
||||
tunnel_id = TUN_MIN + 5
|
||||
|
@ -370,7 +370,7 @@ class TestOvsNeutronAgent(base.BaseTestCase):
|
||||
root_helper='sudo')
|
||||
version_ok = True
|
||||
except SystemExit as e:
|
||||
self.assertEquals(e.code, 1)
|
||||
self.assertEqual(e.code, 1)
|
||||
version_ok = False
|
||||
self.assertEqual(version_ok, expecting_ok)
|
||||
|
||||
|
@ -350,4 +350,4 @@ class TestFirewallPluginBase(test_db_firewall.TestFirewallDBPlugin):
|
||||
with self.firewall(no_delete=True) as fw:
|
||||
fw_id = fw['firewall']['id']
|
||||
fw_rules = self.plugin._make_firewall_dict_with_rules(ctx, fw_id)
|
||||
self.assertEquals(fw_rules['firewall_rule_list'], [])
|
||||
self.assertEqual(fw_rules['firewall_rule_list'], [])
|
||||
|
@ -3040,10 +3040,10 @@ class TestSubnetsV2(NeutronDbPluginV2TestCase):
|
||||
req = self.new_update_request('subnets', data,
|
||||
res['subnet']['id'])
|
||||
res = self.deserialize(self.fmt, req.get_response(self.api))
|
||||
self.assertEquals(sorted(res['subnet']['host_routes']),
|
||||
sorted(host_routes))
|
||||
self.assertEquals(sorted(res['subnet']['dns_nameservers']),
|
||||
sorted(dns_nameservers))
|
||||
self.assertEqual(sorted(res['subnet']['host_routes']),
|
||||
sorted(host_routes))
|
||||
self.assertEqual(sorted(res['subnet']['dns_nameservers']),
|
||||
sorted(dns_nameservers))
|
||||
|
||||
def test_update_subnet_shared_returns_400(self):
|
||||
with self.network(shared=True) as network:
|
||||
|
@ -369,7 +369,7 @@ class TestDhcpAgent(base.BaseTestCase):
|
||||
cfg.CONF.root_helper
|
||||
)
|
||||
|
||||
self.assertEquals(set(networks), set(dhcp.cache.get_network_ids()))
|
||||
self.assertEqual(set(networks), set(dhcp.cache.get_network_ids()))
|
||||
|
||||
|
||||
class TestLogArgs(base.BaseTestCase):
|
||||
|
@ -170,7 +170,7 @@ class SecurityGroupsTestCase(test_db_plugin.NeutronDbPluginV2TestCase):
|
||||
in as expected_kvs dictionary
|
||||
"""
|
||||
for k, v in expected_kvs.iteritems():
|
||||
self.assertEquals(security_group_rule[k], v)
|
||||
self.assertEqual(security_group_rule[k], v)
|
||||
|
||||
|
||||
class SecurityGroupsTestCaseXML(SecurityGroupsTestCase):
|
||||
@ -257,10 +257,10 @@ class TestSecurityGroups(SecurityGroupDBTestCase):
|
||||
# Verify that default egress rules have been created
|
||||
|
||||
sg_rules = security_group['security_group']['security_group_rules']
|
||||
self.assertEquals(len(sg_rules), 2)
|
||||
self.assertEqual(len(sg_rules), 2)
|
||||
|
||||
v4_rules = filter(lambda x: x['ethertype'] == 'IPv4', sg_rules)
|
||||
self.assertEquals(len(v4_rules), 1)
|
||||
self.assertEqual(len(v4_rules), 1)
|
||||
v4_rule = v4_rules[0]
|
||||
expected = {'direction': 'egress',
|
||||
'ethertype': 'IPv4',
|
||||
@ -272,7 +272,7 @@ class TestSecurityGroups(SecurityGroupDBTestCase):
|
||||
self._assert_sg_rule_has_kvs(v4_rule, expected)
|
||||
|
||||
v6_rules = filter(lambda x: x['ethertype'] == 'IPv6', sg_rules)
|
||||
self.assertEquals(len(v6_rules), 1)
|
||||
self.assertEqual(len(v6_rules), 1)
|
||||
v6_rule = v6_rules[0]
|
||||
expected = {'direction': 'egress',
|
||||
'ethertype': 'IPv6',
|
||||
|
@ -665,7 +665,7 @@ class L3NatDBTestCase(L3NatTestCaseBase):
|
||||
if n['event_type'].startswith('router.interface.'):
|
||||
payload = n['payload']['router.interface']
|
||||
self.assertIn('id', payload)
|
||||
self.assertEquals(payload['id'], r['router']['id'])
|
||||
self.assertEqual(payload['id'], r['router']['id'])
|
||||
self.assertIn('tenant_id', payload)
|
||||
stid = s['subnet']['tenant_id']
|
||||
# tolerate subnet tenant deliberately to '' in the
|
||||
|
@ -790,8 +790,8 @@ tag:tag1,249,%s,%s""".lstrip() % (fake_v6,
|
||||
result = dhcp.Dnsmasq.existing_dhcp_networks(self.conf, 'sudo')
|
||||
|
||||
mock_listdir.assert_called_once_with(path)
|
||||
self.assertEquals(['aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa'],
|
||||
result)
|
||||
self.assertEqual(['aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa'],
|
||||
result)
|
||||
|
||||
def _check_version(self, cmd_out, expected_value):
|
||||
with mock.patch('neutron.agent.linux.utils.execute') as cmd:
|
||||
|
@ -386,14 +386,14 @@ class TestMetaInterfaceDriver(TestBase):
|
||||
namespace=None)
|
||||
expected = [mock.call('tap0', 'sudo', None)]
|
||||
self.ip_dev.assert_has_calls(expected)
|
||||
self.assertEquals('fake1', plugin_tag0)
|
||||
self.assertEqual('fake1', plugin_tag0)
|
||||
namespace = '01234567-1234-1234-99'
|
||||
expected = [mock.call('tap1', 'sudo', '01234567-1234-1234-99')]
|
||||
plugin_tag1 = meta_interface._get_device_plugin_tag(
|
||||
'tap1',
|
||||
namespace=namespace)
|
||||
self.ip_dev.assert_has_calls(expected)
|
||||
self.assertEquals('fake1', plugin_tag1)
|
||||
self.assertEqual('fake1', plugin_tag1)
|
||||
|
||||
|
||||
class TestIVSInterfaceDriver(TestBase):
|
||||
|
@ -107,7 +107,7 @@ class TestWSGIServer(base.BaseTestCase):
|
||||
server.start(hello_world, 0, host="127.0.0.1")
|
||||
|
||||
response = urllib2.urlopen('http://127.0.0.1:%d/' % server.port)
|
||||
self.assertEquals(greetings, response.read())
|
||||
self.assertEqual(greetings, response.read())
|
||||
|
||||
server.stop()
|
||||
|
||||
@ -1088,7 +1088,7 @@ class TestWSGIServerWithSSL(base.BaseTestCase):
|
||||
server.start(hello_world, 0, host="127.0.0.1")
|
||||
|
||||
response = urllib2.urlopen('https://127.0.0.1:%d/' % server.port)
|
||||
self.assertEquals(greetings, response.read())
|
||||
self.assertEqual(greetings, response.read())
|
||||
|
||||
server.stop()
|
||||
|
||||
@ -1109,6 +1109,6 @@ class TestWSGIServerWithSSL(base.BaseTestCase):
|
||||
server.start(hello_world, 0, host="::1")
|
||||
|
||||
response = urllib2.urlopen('https://[::1]:%d/' % server.port)
|
||||
self.assertEquals(greetings, response.read())
|
||||
self.assertEqual(greetings, response.read())
|
||||
|
||||
server.stop()
|
||||
|
Loading…
Reference in New Issue
Block a user