Merge "assertEquals is deprecated, use assertEqual"

This commit is contained in:
Jenkins 2013-09-17 21:20:37 +00:00 committed by Gerrit Code Review
commit 45fcd6f7ba
6 changed files with 11 additions and 11 deletions

View File

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

View File

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

View File

@ -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,

View File

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

View File

@ -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]

View File

@ -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(