From 1c94c6ab40f5320f74d992281ea7ebed3b55c730 Mon Sep 17 00:00:00 2001 From: Eric Harney Date: Thu, 11 Feb 2016 10:51:46 -0500 Subject: [PATCH] Tests: Fix calls to non-existent assert methods These tests currently aren't asserting anything. Related-Bug: #1544522 Change-Id: Ic051ca411abcb8bb62b7897292c89c5c9e552599 --- cinder/tests/unit/test_dellsc.py | 2 +- cinder/tests/unit/test_dellscapi.py | 16 ++++++++-------- cinder/tests/unit/test_utils.py | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cinder/tests/unit/test_dellsc.py b/cinder/tests/unit/test_dellsc.py index 1c3cfdb20..41da54303 100644 --- a/cinder/tests/unit/test_dellsc.py +++ b/cinder/tests/unit/test_dellsc.py @@ -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) diff --git a/cinder/tests/unit/test_dellscapi.py b/cinder/tests/unit/test_dellscapi.py index 0ec81f6e7..7b082dfb0 100644 --- a/cinder/tests/unit/test_dellscapi.py +++ b/cinder/tests/unit/test_dellscapi.py @@ -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) diff --git a/cinder/tests/unit/test_utils.py b/cinder/tests/unit/test_utils.py index 0bddc52c9..b3047e920 100644 --- a/cinder/tests/unit/test_utils.py +++ b/cinder/tests/unit/test_utils.py @@ -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) -- 2.45.2