diff --git a/src/resdk/resources/data.py b/src/resdk/resources/data.py index ec5a9786..ccbcea9d 100644 --- a/src/resdk/resources/data.py +++ b/src/resdk/resources/data.py @@ -370,7 +370,7 @@ def download_and_rename( file_name: Optional[str] = None, download_dir: Optional[str] = None, ): - """Download and rename a single file from data object.""" + """Download and rename a single file from the Data object.""" if download_dir is None: download_dir = os.getcwd() diff --git a/tests/unit/test_collection.py b/tests/unit/test_collection.py index df6afa1d..7017d871 100644 --- a/tests/unit/test_collection.py +++ b/tests/unit/test_collection.py @@ -45,18 +45,14 @@ def test_field_name(self, collection_mock): collection_mock.configure_mock(data=[DATA0, DATA2], resolwe=MagicMock()) BaseCollection.download(collection_mock, field_name="output.exp") flist = ["2/outfile.exp"] - collection_mock.resolwe._download_files.assert_called_once_with( - files=flist, download_dir=None - ) + collection_mock.resolwe._download_files.assert_called_once_with(flist, None) # Check if ``output_field`` does not start with 'output' collection_mock.reset_mock() collection_mock.configure_mock(data=[DATA1, DATA0], resolwe=MagicMock()) BaseCollection.download(collection_mock, field_name="fastq") flist = ["1/reads.fq", "1/arch.gz"] - collection_mock.resolwe._download_files.assert_called_once_with( - files=flist, download_dir=None - ) + collection_mock.resolwe._download_files.assert_called_once_with(flist, None) def test_bad_field_name(self): collection = Collection(resolwe=MagicMock(), id=1) diff --git a/tests/unit/test_data.py b/tests/unit/test_data.py index 6a8dedb4..f6e3b9c4 100644 --- a/tests/unit/test_data.py +++ b/tests/unit/test_data.py @@ -180,7 +180,6 @@ def test_download_ok(self, data_mock): data_mock.resolwe._download_files.assert_called_once_with( files=["123/file1.txt", "123/file2.fq.gz"], download_dir=None, - custom_file_names=None, ) data_mock.reset_mock() @@ -188,7 +187,6 @@ def test_download_ok(self, data_mock): data_mock.resolwe._download_files.assert_called_once_with( files=["123/file1.txt", "123/file2.fq.gz"], download_dir="/some/path/", - custom_file_names=None, ) data_mock.reset_mock()