123456789101112 |
- def test_list_files(self, mock_service):
- mock_instance = mock_service.return_value
- mock_instance.list_directories_and_files.return_value = [
- File("file1"),
- File("file2"),
- Directory("dir1"),
- Directory("dir2"),
- ]
- hook = AzureFileShareHook(azure_fileshare_conn_id='azure_fileshare_extras')
- files = hook.list_files('share', 'directory', timeout=1)
- assert files == ["file1", 'file2']
- mock_instance.list_directories_and_files.assert_called_once_with('share', 'directory', timeout=1)
|