I have this class method
def _copy_blob(self, source_blob: str, target_file_path: str) -> None:
"""
Copy blob to a new location
:param source_blob:
:param target_file_path:
"""
copied_blob = self.blob_service_client.get_blob_client(self.container, target_file_path)
copied_blob.start_copy_from_url(source_blob)
I wrote unit test for the first line:
def test_copy_blob(mocker, file, source_blob, target_file_path):
blob_service_client_mock = mocker.MagicMock()
blob_service_client_mock.account_name = 'test_account'
file = TestClass(file, blob_service_client_mock, container='test')
file._copy_blob(source_blob, target_file_path)
blob_service_client_mock.get_blob_client.assert_any_call('test', target_file_path)
How can I test
copied_blob.start_copy_from_url(source_blob)
has been called?