assertEquals is deprecated, use assertEqual

Change-Id: I805ff6a68925f9214645c192eb986a70f30bf714
This commit is contained in:
Dirk Mueller 2013-09-17 21:26:35 +02:00
parent 1f563d6061
commit f4058ea217
5 changed files with 7 additions and 7 deletions

View File

@ -105,9 +105,9 @@ class VolumeTypesManageApiTest(test.TestCase):
self.stubs.Set(volume_types, 'destroy',
return_volume_types_with_volumes_destroy)
req = fakes.HTTPRequest.blank('/v2/fake/types/1')
self.assertEquals(len(test_notifier.NOTIFICATIONS), 0)
self.assertEqual(len(test_notifier.NOTIFICATIONS), 0)
self.controller._delete(req, 1)
self.assertEquals(len(test_notifier.NOTIFICATIONS), 1)
self.assertEqual(len(test_notifier.NOTIFICATIONS), 1)
def test_create(self):
self.stubs.Set(volume_types, 'create',

View File

@ -315,7 +315,7 @@ class VolumeApiTest(test.TestCase):
'id': '1',
'created_at': datetime.datetime(1, 1, 1, 1, 1, 1),
'size': 1}}
self.assertEquals(res_dict, expected)
self.assertEqual(res_dict, expected)
def test_update_empty_body(self):
body = {}

View File

@ -363,7 +363,7 @@ class VolumeApiTest(test.TestCase):
}
],
}}
self.assertEquals(res_dict, expected)
self.assertEqual(res_dict, expected)
def test_update_empty_body(self):
body = {}

View File

@ -438,7 +438,7 @@ class BackupCephTestCase(test.TestCase):
rem = self.service._delete_backup_snapshot(mock_rados(), base_name,
self.backup_id)
self.assertEquals(rem, (snap_name, 0))
self.assertEqual(rem, (snap_name, 0))
def test_try_delete_base_image_diff_format(self):
# don't create volume db entry since it should not be required

View File

@ -560,7 +560,7 @@ class ManagedRBDTestCase(DriverTestCase):
self.stubs.Set(self.volume.driver, '_is_cloneable', lambda x: False)
image_loc = (object(), object())
actual = self.volume.driver.clone_image(object(), image_loc, object())
self.assertEquals(expected, actual)
self.assertEqual(expected, actual)
self.stubs.Set(self.volume.driver, '_is_cloneable', lambda x: True)
self.assertEqual(expected,
@ -575,7 +575,7 @@ class ManagedRBDTestCase(DriverTestCase):
self.stubs.Set(self.volume.driver, '_clone', lambda *args: None)
self.stubs.Set(self.volume.driver, '_resize', lambda *args: None)
actual = self.volume.driver.clone_image(object(), image_loc, object())
self.assertEquals(expected, actual)
self.assertEqual(expected, actual)
def test_clone_success(self):
self.stubs.Set(self.volume.driver, '_is_cloneable', lambda x: True)