From: Tom Barron Date: Fri, 12 Feb 2016 16:48:16 +0000 (-0500) Subject: Fix 'asert' typo in unit test X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=9434d70306979b7559e7f1b3c14547a56cbeff1c;p=openstack-build%2Fcinder-build.git Fix 'asert' typo in unit test 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 --- diff --git a/cinder/tests/unit/test_dellscapi.py b/cinder/tests/unit/test_dellscapi.py index c553bc4ed..aead70fc0 100644 --- a/cinder/tests/unit/test_dellscapi.py +++ b/cinder/tests/unit/test_dellscapi.py @@ -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)