]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Tests: Fix calls to non-existent assert methods
authorEric Harney <eharney@redhat.com>
Thu, 11 Feb 2016 15:51:46 +0000 (10:51 -0500)
committerEric Harney <eharney@redhat.com>
Thu, 11 Feb 2016 15:58:55 +0000 (10:58 -0500)
These tests currently aren't asserting anything.

Related-Bug: #1544522

Change-Id: Ic051ca411abcb8bb62b7897292c89c5c9e552599

cinder/tests/unit/test_dellsc.py
cinder/tests/unit/test_dellscapi.py
cinder/tests/unit/test_utils.py

index 1c3cfdb207a199b4271aa2611e986f3b1d306065..41da543030cf00cfef086b0825bc3399080a9c0b 100644 (file)
@@ -2171,7 +2171,7 @@ class DellSCSanISCSIDriverTestCase(test.TestCase):
             None, {'id': 'volid'}, None,
             {'extra_specs': {'storagetype:storageprofile': ['A', 'B']}},
             None)
-        mock_update_storage_profile.ssert_called_once_with(
+        mock_update_storage_profile.assert_called_once_with(
             self.VOLUME, 'B')
         self.assertTrue(res)
 
index 0ec81f6e7538a253d363766a9fc3fcaee0f1cdda..7b082dfb0903013c2760b0920103fba01231c591 100644 (file)
@@ -5584,7 +5584,7 @@ class DellSCSanAPITestCase(test.TestCase):
                           self.scapi.manage_existing,
                           newname,
                           existing)
-        mock_get_volume_list.asert_called_once_with(
+        mock_get_volume_list.assert_called_once_with(
             existing.get('source-name'),
             existing.get('source-id'),
             False)
@@ -5610,7 +5610,7 @@ class DellSCSanAPITestCase(test.TestCase):
                           self.scapi.manage_existing,
                           newname,
                           existing)
-        mock_get_volume_list.asert_called_once_with(
+        mock_get_volume_list.assert_called_once_with(
             existing.get('source-name'),
             existing.get('source-id'),
             False)
@@ -5640,7 +5640,7 @@ class DellSCSanAPITestCase(test.TestCase):
                           self.scapi.manage_existing,
                           newname,
                           existing)
-        mock_get_volume_list.asert_called_once_with(
+        mock_get_volume_list.assert_called_once_with(
             existing.get('source-name'),
             existing.get('source-id'),
             False)
@@ -5675,7 +5675,7 @@ class DellSCSanAPITestCase(test.TestCase):
                           self.scapi.manage_existing,
                           newname,
                           existing)
-        mock_get_volume_list.asert_called_once_with(
+        mock_get_volume_list.assert_called_once_with(
             existing.get('source-name'),
             existing.get('source-id'),
             False)
@@ -5697,7 +5697,7 @@ class DellSCSanAPITestCase(test.TestCase):
                                        mock_init):
         existing = {'source-name': 'scvolname'}
         res = self.scapi.get_unmanaged_volume_size(existing)
-        mock_get_volume_list.asert_called_once_with(
+        mock_get_volume_list.assert_called_once_with(
             existing.get('source-name'),
             existing.get('source-id'),
             False)
@@ -5716,7 +5716,7 @@ class DellSCSanAPITestCase(test.TestCase):
         self.assertRaises(exception.ManageExistingInvalidReference,
                           self.scapi.get_unmanaged_volume_size,
                           existing)
-        mock_get_volume_list.asert_called_once_with(
+        mock_get_volume_list.assert_called_once_with(
             existing.get('source-name'),
             existing.get('source-id'),
             False)
@@ -5733,7 +5733,7 @@ class DellSCSanAPITestCase(test.TestCase):
         self.assertRaises(exception.ManageExistingInvalidReference,
                           self.scapi.get_unmanaged_volume_size,
                           existing)
-        mock_get_volume_list.asert_called_once_with(
+        mock_get_volume_list.assert_called_once_with(
             existing.get('source-name'),
             existing.get('source-id'),
             False)
@@ -5756,7 +5756,7 @@ class DellSCSanAPITestCase(test.TestCase):
                           self.scapi.get_unmanaged_volume_size,
                           existing)
         self.assertTrue(mock_size_to_gb.called)
-        mock_get_volume_list.asert_called_once_with(
+        mock_get_volume_list.assert_called_once_with(
             existing.get('source-name'),
             existing.get('source-id'),
             False)
index 0bddc52c9dfb13ba126706272f35c9fbad7204ea..b3047e9209993055dd7c5e65296462c25976d7bd 100644 (file)
@@ -393,7 +393,7 @@ class TemporaryChownTestCase(test.TestCase):
         with utils.temporary_chown(test_filename):
             mock_exec.assert_called_once_with('chown', 1234, test_filename,
                                               run_as_root=True)
-        mock_getuid.asset_called_once_with()
+        mock_getuid.assert_called_once_with()
         mock_stat.assert_called_once_with(test_filename)
         calls = [mock.call('chown', 1234, test_filename, run_as_root=True),
                  mock.call('chown', 5678, test_filename, run_as_root=True)]
@@ -422,7 +422,7 @@ class TemporaryChownTestCase(test.TestCase):
         test_filename = 'a_file'
         with utils.temporary_chown(test_filename):
             pass
-        mock_getuid.asset_called_once_with()
+        mock_getuid.assert_called_once_with()
         mock_stat.assert_called_once_with(test_filename)
         self.assertFalse(mock_exec.called)