diff --git a/clients/python/src/osparc/_api_files_api.py b/clients/python/src/osparc/_api_files_api.py index 262a20ec..965c6bf0 100644 --- a/clients/python/src/osparc/_api_files_api.py +++ b/clients/python/src/osparc/_api_files_api.py @@ -272,11 +272,15 @@ def _search_files( sha256_checksum: Optional[str] = None, timeout_seconds: int = DEFAULT_TIMEOUT_SECONDS, ) -> PaginationIterator: + kwargs = { + "file_id": file_id, + "sha256_checksum": sha256_checksum, + "_request_timeout": timeout_seconds, + } + def _pagination_method(): return super(FilesApi, self).search_files_page( - file_id=file_id, - sha256_checksum=sha256_checksum, - _request_timeout=timeout_seconds, + **{k: v for k, v in kwargs.items() if v is not None} ) return PaginationIterator( diff --git a/clients/python/test/e2e/test_files_api.py b/clients/python/test/e2e/test_files_api.py index 5a292a2c..3b6675f7 100644 --- a/clients/python/test/e2e/test_files_api.py +++ b/clients/python/test/e2e/test_files_api.py @@ -85,9 +85,10 @@ def max_diff(data: List[int]) -> int: assert _hash_file(Path(downloaded_file)) == _hash_file(large_server_file.local_file) -@skip_if_osparc_version(at_least=Version("0.8.0")) -@pytest.mark.parametrize("use_checksum", [True, False]) -@pytest.mark.parametrize("use_id", [True, False]) +@skip_if_osparc_version(at_least=Version("0.8.3.post0.dev20")) +@pytest.mark.parametrize( + "use_checksum,use_id", [(True, True), (False, True), (True, False)] +) def test_search_files( large_server_file: Callable[[ByteSize], Path], files_api: osparc.FilesApi,