diff --git a/novaclient/tests/test_auth_plugins.py b/novaclient/tests/test_auth_plugins.py index c4b37b57d..96217991a 100644 --- a/novaclient/tests/test_auth_plugins.py +++ b/novaclient/tests/test_auth_plugins.py @@ -171,7 +171,7 @@ class DeprecatedAuthPluginTest(utils.TestCase): auth_system="fakewithauthurl", auth_plugin=plugin) cs.client.authenticate() - self.assertEquals(cs.client.auth_url, "http://faked/v2.0") + self.assertEqual(cs.client.auth_url, "http://faked/v2.0") test_auth_call() @@ -301,7 +301,7 @@ class AuthPluginTest(utils.TestCase): cs = client.Client("username", "password", "project_id", auth_system="fakewithauthurl", auth_plugin=plugin) - self.assertEquals(cs.client.auth_url, "http://faked/v2.0") + self.assertEqual(cs.client.auth_url, "http://faked/v2.0") @mock.patch.object(pkg_resources, "iter_entry_points") def test_exception_if_no_authenticate(self, mock_iter_entry_points): diff --git a/novaclient/tests/test_http.py b/novaclient/tests/test_http.py index 015928015..f6ebb7a7e 100644 --- a/novaclient/tests/test_http.py +++ b/novaclient/tests/test_http.py @@ -115,8 +115,8 @@ class ClientTest(utils.TestCase): def test_client_logger(self): cl1 = client.HTTPClient("username", "password", "project_id", "auth_test", http_log_debug=True) - self.assertEquals(len(cl1._logger.handlers), 1) + self.assertEqual(len(cl1._logger.handlers), 1) cl2 = client.HTTPClient("username", "password", "project_id", "auth_test", http_log_debug=True) - self.assertEquals(len(cl2._logger.handlers), 1) + self.assertEqual(len(cl2._logger.handlers), 1) diff --git a/novaclient/tests/test_service_catalog.py b/novaclient/tests/test_service_catalog.py index 1d73c73dc..a34d82ffb 100644 --- a/novaclient/tests/test_service_catalog.py +++ b/novaclient/tests/test_service_catalog.py @@ -116,9 +116,9 @@ class ServiceCatalogTest(utils.TestCase): self.assertRaises(exceptions.AmbiguousEndpoints, sc.url_for, service_type='compute') - self.assertEquals(sc.url_for('tenantId', '1', service_type='compute'), + self.assertEqual(sc.url_for('tenantId', '1', service_type='compute'), "https://compute1.host/v2/1") - self.assertEquals(sc.url_for('tenantId', '2', service_type='compute'), + self.assertEqual(sc.url_for('tenantId', '2', service_type='compute'), "https://compute1.host/v1.1/2") self.assertRaises(exceptions.EndpointNotFound, sc.url_for, @@ -135,9 +135,9 @@ class ServiceCatalogTest(utils.TestCase): self.assertRaises(exceptions.AmbiguousEndpoints, sc.url_for, service_type='volume') - self.assertEquals(sc.url_for('tenantId', '1', service_type='volume'), + self.assertEqual(sc.url_for('tenantId', '1', service_type='volume'), "https://volume1.host/v1/1") - self.assertEquals(sc.url_for('tenantId', '2', service_type='volume'), + self.assertEqual(sc.url_for('tenantId', '2', service_type='volume'), "https://volume1.host/v1.1/2") self.assertRaises(exceptions.EndpointNotFound, sc.url_for, diff --git a/novaclient/tests/v1_1/test_security_group_rules.py b/novaclient/tests/v1_1/test_security_group_rules.py index e42592761..e1d015fa5 100644 --- a/novaclient/tests/v1_1/test_security_group_rules.py +++ b/novaclient/tests/v1_1/test_security_group_rules.py @@ -60,7 +60,7 @@ class SecurityGroupRulesTest(utils.TestCase): def test_security_group_rule_str(self): sg = cs.security_group_rules.create(1, "tcp", 1, 65535, "10.0.0.0/16") - self.assertEquals('1', str(sg)) + self.assertEqual('1', str(sg)) def test_security_group_rule_del(self): sg = cs.security_group_rules.create(1, "tcp", 1, 65535, "10.0.0.0/16") diff --git a/novaclient/tests/v1_1/test_security_groups.py b/novaclient/tests/v1_1/test_security_groups.py index 9f3ae46bb..0040d3054 100644 --- a/novaclient/tests/v1_1/test_security_groups.py +++ b/novaclient/tests/v1_1/test_security_groups.py @@ -29,7 +29,7 @@ class SecurityGroupsTest(utils.TestCase): sg = cs.security_groups.get(1) cs.assert_called('GET', '/os-security-groups/1') self.assertTrue(isinstance(sg, security_groups.SecurityGroup)) - self.assertEquals('1', str(sg)) + self.assertEqual('1', str(sg)) def test_delete_security_group(self): sg = cs.security_groups.list()[0] diff --git a/novaclient/tests/v1_1/test_servers.py b/novaclient/tests/v1_1/test_servers.py index 658068f77..76d3e3cd8 100644 --- a/novaclient/tests/v1_1/test_servers.py +++ b/novaclient/tests/v1_1/test_servers.py @@ -42,7 +42,7 @@ class ServersTest(utils.TestCase): s2 = cs.servers.list(detailed=True)[0] self.assertNotEquals(s1._info, s2._info) s1.get() - self.assertEquals(s1._info, s2._info) + self.assertEqual(s1._info, s2._info) def test_create_server(self): s = cs.servers.create(