From: Dirk Mueller Date: Tue, 17 Sep 2013 19:26:35 +0000 (+0200) Subject: assertEquals is deprecated, use assertEqual X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=f4058ea21783ecc1eecb377e88a4f12c03cd2475;p=openstack-build%2Fcinder-build.git assertEquals is deprecated, use assertEqual Change-Id: I805ff6a68925f9214645c192eb986a70f30bf714 --- diff --git a/cinder/tests/api/contrib/test_types_manage.py b/cinder/tests/api/contrib/test_types_manage.py index 596a7184e..8dcef32e7 100644 --- a/cinder/tests/api/contrib/test_types_manage.py +++ b/cinder/tests/api/contrib/test_types_manage.py @@ -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', diff --git a/cinder/tests/api/v1/test_volumes.py b/cinder/tests/api/v1/test_volumes.py index ee8fa1970..b09b39ed2 100644 --- a/cinder/tests/api/v1/test_volumes.py +++ b/cinder/tests/api/v1/test_volumes.py @@ -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 = {} diff --git a/cinder/tests/api/v2/test_volumes.py b/cinder/tests/api/v2/test_volumes.py index d4f1aeab2..b31a3076d 100644 --- a/cinder/tests/api/v2/test_volumes.py +++ b/cinder/tests/api/v2/test_volumes.py @@ -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 = {} diff --git a/cinder/tests/test_backup_ceph.py b/cinder/tests/test_backup_ceph.py index 26e1e0fae..7702443ca 100644 --- a/cinder/tests/test_backup_ceph.py +++ b/cinder/tests/test_backup_ceph.py @@ -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 diff --git a/cinder/tests/test_rbd.py b/cinder/tests/test_rbd.py index d782fdc73..d8a1b0e46 100644 --- a/cinder/tests/test_rbd.py +++ b/cinder/tests/test_rbd.py @@ -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)