Tests: Fix calls to non-existent assert methods

These tests currently aren't asserting anything.

Related-Bug: #1544522

Change-Id: Ic051ca411abcb8bb62b7897292c89c5c9e552599
This commit is contained in:
Eric Harney 2016-02-11 10:51:46 -05:00
parent ed9a211973
commit 1c94c6ab40
3 changed files with 11 additions and 11 deletions

View 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)

View 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)

View 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)