]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
assertEquals is deprecated, use assertEqual
authorDirk Mueller <dirk@dmllr.de>
Tue, 17 Sep 2013 19:26:35 +0000 (21:26 +0200)
committerDirk Mueller <dirk@dmllr.de>
Tue, 17 Sep 2013 19:26:35 +0000 (21:26 +0200)
Change-Id: I805ff6a68925f9214645c192eb986a70f30bf714

cinder/tests/api/contrib/test_types_manage.py
cinder/tests/api/v1/test_volumes.py
cinder/tests/api/v2/test_volumes.py
cinder/tests/test_backup_ceph.py
cinder/tests/test_rbd.py

index 596a7184e3567ad88c381db54c53e3e9d0927342..8dcef32e713f1cf59c531183c9fc24db9cf3bcb5 100644 (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',
index ee8fa197051e4f3a1bfdf6e17a8d762d8a6ef1a8..b09b39ed22ae547159d6f08b5784884464465804 100644 (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 = {}
index d4f1aeab250ced15d4f5987c16baa08fd80a0a3b..b31a3076d0d56739afa3178e96e115f0e1092fa6 100644 (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 = {}
index 26e1e0faecb2a6785352a2bc1aadba2fe3dd1d6e..7702443ca82e503451e513d70f61eea773ad71a8 100644 (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
index d782fdc7396b185dfb38dfbbcb326ec3c43b3276..d8a1b0e4606ec2caaf7103bbc70c673e5b60bc0a 100644 (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)