From c55589605ca2926ee8ac5be0f850cad879156c5d Mon Sep 17 00:00:00 2001 From: zhufl Date: Wed, 15 Apr 2020 08:53:56 +0800 Subject: [PATCH] Fix invalid assert statement This is to fix the following assert statements: * asser_called_once_with, which should be assert_called_once_with * asser_called_once, which should be assert_called_once Change-Id: I0025b06d6b10249b118a46e67d8ca6ba56d4befd --- .../netapp/dataontap/cluster_mode/test_lib_base.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/manila/tests/share/drivers/netapp/dataontap/cluster_mode/test_lib_base.py b/manila/tests/share/drivers/netapp/dataontap/cluster_mode/test_lib_base.py index 442a666a92..6a64d41192 100644 --- a/manila/tests/share/drivers/netapp/dataontap/cluster_mode/test_lib_base.py +++ b/manila/tests/share/drivers/netapp/dataontap/cluster_mode/test_lib_base.py @@ -779,7 +779,7 @@ class NetAppFileStorageLibraryTestCase(test.TestCase): self.mock_allocate_container.assert_called_once_with( self.fake_share, fake.VSERVER2, self.dest_vserver_client, replica=True) - self.mock_dm_create_snapmirror.asser_called_once() + self.mock_dm_create_snapmirror.assert_called_once() self.temp_src_share['replica_state'] = ( constants.REPLICA_STATE_ACTIVE) state = self.library.STATE_SNAPMIRROR_DATA_COPYING @@ -1056,7 +1056,7 @@ class NetAppFileStorageLibraryTestCase(test.TestCase): cutover_action='defer') self.fake_src_share['internal_state'] = ( self.library.STATE_MOVING_VOLUME) - self.mock_pvt_storage_update.asser_called_once_with( + self.mock_pvt_storage_update.assert_called_once_with( fake.SHARE['id'], {'source_share': json.dumps(self.fake_src_share)} ) @@ -1119,7 +1119,7 @@ class NetAppFileStorageLibraryTestCase(test.TestCase): expect_result['export_locations'] = self.fake_export_location self.assertEqual(expect_result, result) else: - self.mock_pvt_storage_update.asser_called_once_with( + self.mock_pvt_storage_update.assert_called_once_with( fake.SHARE['id'], {'source_share': json.dumps(self.fake_src_share)} ) @@ -1184,7 +1184,7 @@ class NetAppFileStorageLibraryTestCase(test.TestCase): expect_result['export_locations'] = self.fake_export_location self.assertEqual(expect_result, result) elif replica_state not in [constants.STATUS_ERROR, None]: - self.mock_pvt_storage_update.asser_called_once_with( + self.mock_pvt_storage_update.assert_called_once_with( fake.SHARE['id'], {'source_share': json.dumps(self.fake_src_share)} )