From 6844e54f13b741d2a4b0b118a4a5e7d1cc122ed0 Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Thu, 24 Oct 2013 07:53:29 +0200 Subject: [PATCH] change assertEquals to assertEqual According to http://docs.python.org/2/library/unittest.html assertEquals is a deprecated alias of assertEqual. https://review.openstack.org/#/c/56652/ updates to a new version of hacking that enforces H602. Turning that on requires this change to land first. Re-do of https://review.openstack.org/#/c/53510 since that is abandoned. Change-Id: Ie621edc8770e2015df5712f77d4cf9679b02bd0f --- cinderclient/tests/test_service_catalog.py | 32 +++++++++++----------- cinderclient/tests/v1/test_shell.py | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/cinderclient/tests/test_service_catalog.py b/cinderclient/tests/test_service_catalog.py index 105596244..d8155571b 100644 --- a/cinderclient/tests/test_service_catalog.py +++ b/cinderclient/tests/test_service_catalog.py @@ -240,10 +240,10 @@ class ServiceCatalogTest(utils.TestCase): self.assertRaises(exceptions.AmbiguousEndpoints, sc.url_for, service_type='compute') - self.assertEquals(sc.url_for('tenantId', '1', service_type='compute'), - "https://compute1.host/v1/1234") - self.assertEquals(sc.url_for('tenantId', '2', service_type='compute'), - "https://compute1.host/v1/3456") + self.assertEqual(sc.url_for('tenantId', '1', service_type='compute'), + "https://compute1.host/v1/1234") + self.assertEqual(sc.url_for('tenantId', '2', service_type='compute'), + "https://compute1.host/v1/3456") self.assertRaises(exceptions.EndpointNotFound, sc.url_for, "region", "South", service_type='compute') @@ -253,15 +253,15 @@ class ServiceCatalogTest(utils.TestCase): self.assertRaises(exceptions.AmbiguousEndpoints, sc.url_for, service_type='volume') - self.assertEquals(sc.url_for('tenantId', '1', service_type='volume'), - "https://volume1.host/v1/1234") - self.assertEquals(sc.url_for('tenantId', '2', service_type='volume'), - "https://volume1.host/v1/3456") + self.assertEqual(sc.url_for('tenantId', '1', service_type='volume'), + "https://volume1.host/v1/1234") + self.assertEqual(sc.url_for('tenantId', '2', service_type='volume'), + "https://volume1.host/v1/3456") - self.assertEquals(sc.url_for('tenantId', '2', service_type='volumev2'), - "https://volume1.host/v2/3456") - self.assertEquals(sc.url_for('tenantId', '2', service_type='volumev2'), - "https://volume1.host/v2/3456") + self.assertEqual(sc.url_for('tenantId', '2', service_type='volumev2'), + "https://volume1.host/v2/3456") + self.assertEqual(sc.url_for('tenantId', '2', service_type='volumev2'), + "https://volume1.host/v2/3456") self.assertRaises(exceptions.EndpointNotFound, sc.url_for, "region", "North", service_type='volume') @@ -269,7 +269,7 @@ class ServiceCatalogTest(utils.TestCase): def test_compatibility_service_type(self): sc = service_catalog.ServiceCatalog(SERVICE_COMPATIBILITY_CATALOG) - self.assertEquals(sc.url_for('tenantId', '1', service_type='volume'), - "https://volume1.host/v2/1234") - self.assertEquals(sc.url_for('tenantId', '2', service_type='volume'), - "https://volume1.host/v2/3456") + self.assertEqual(sc.url_for('tenantId', '1', service_type='volume'), + "https://volume1.host/v2/1234") + self.assertEqual(sc.url_for('tenantId', '2', service_type='volume'), + "https://volume1.host/v2/3456") diff --git a/cinderclient/tests/v1/test_shell.py b/cinderclient/tests/v1/test_shell.py index c9954100b..1df55859e 100644 --- a/cinderclient/tests/v1/test_shell.py +++ b/cinderclient/tests/v1/test_shell.py @@ -86,7 +86,7 @@ class ShellTest(utils.TestCase): for input in inputs: args = Arguments(metadata=input[0]) - self.assertEquals(shell_v1._extract_metadata(args), input[1]) + self.assertEqual(shell_v1._extract_metadata(args), input[1]) def test_list(self): self.run_command('list')