def test_sync_outbox_host_to_buffer_processes_all_files_for_host(self): self.build_file_index.return_value = ['file1.txt', 'file2.txt', 'file3.txt'] self.remote_driver.sort_file_entries_by_size.return_value = self.build_file_index.return_value sync_outbox_host_to_buffer('testhost', self.remote_driver) self.assertEqual(3, len(self.process_file.mock_calls))
def test_sync_outbox_host_to_buffer_builds_file_index(self): sync_outbox_host_to_buffer('testhost', self.remote_driver) self.build_file_index.assert_called_once_with(self.list_all_files_for_host.return_value, self.remote_driver)
def test_sync_outbox_host_to_buffer_creates_buffer_directory_for_host(self): sync_outbox_host_to_buffer('testhost', self.remote_driver) self.create_host_buffer.assert_called_once_with('testhost')
def test_sync_outbox_host_to_buffer_lists_all_files_for_host(self): sync_outbox_host_to_buffer('testhost', self.remote_driver) self.list_all_files_for_host.assert_called_once_with('testhost', self.remote_driver)