]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fix 'asert' typo in unit test
authorTom Barron <tpb@dyncloud.net>
Fri, 12 Feb 2016 16:48:16 +0000 (11:48 -0500)
committerTom Barron <tpb@dyncloud.net>
Fri, 12 Feb 2016 21:20:13 +0000 (16:20 -0500)
The dellscapi unit tests contain two occurences of an
apparent typo, 'mock_get_volume_list.asert_called_once_with'.
Because mock will magically create an 'asert_called_once_with'
method, this typo masks a problem with the test_manage_unmanage
test where the wrong set of arguments is expected.

This commit substitutes 'assert' for 'asert' in these occurences
and fixes up the test_manage_unmanage test.

Change-Id: I0f1b370ef61b28a46ab48d40595c79ec13e359f8

cinder/tests/unit/test_dellscapi.py

index c553bc4ed859004bf8fbcf5a1b48685e4be97312..aead70fc058fec0ee1f3b15bd5f2c451539ac0f1 100644 (file)
@@ -5533,7 +5533,8 @@ class DellSCSanAPITestCase(test.TestCase):
         newname = 'guid'
         existing = {'source-name': 'scvolname'}
         self.scapi.manage_existing(newname, existing)
-        mock_get_volume_list.asert_called_once_with(existing, False)
+        mock_get_volume_list.assert_called_once_with(
+            existing.get('source-name'), None, False)
         self.assertTrue(mock_find_mappings.called)
         self.assertTrue(mock_size_to_gb.called)
 
@@ -5553,7 +5554,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)