def test_client_download(self, _mock_func): self.assertFalse(d2_files_list) _mock_func.return_value = True r = Client.download(file_path, save_to_path) self.assertTrue(r) self.assertTrue(d2_files_list) self.assertTrue(d2_files_list.has_value(save_to_path)) r = Client.download(file_path, save_to_path) self.assertFalse(r)
def test_client_delete(self, _mock_func_download, _move_func_delete): self.assertFalse(d2_files_list) _mock_func_download.return_value = True _move_func_delete.return_value = True r = Client.download(file_path, save_to_path) self.assertTrue(r) self.assertTrue(d2_files_list.has_value(save_to_path)) r = Client.delete(file_name, as_file_name) self.assertTrue(r) self.assertFalse(d2_files_list.has_value(save_to_path))