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
This commit is contained in:
Christian Berendt 2013-10-24 07:53:29 +02:00 committed by Duncan Thomas
parent cd191d2eb3
commit 6844e54f13
2 changed files with 17 additions and 17 deletions

View File

@ -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")

View File

@ -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')