Skip to content

Commit

Permalink
Function rename + missed httpx mock config
Browse files Browse the repository at this point in the history
  • Loading branch information
mephenor committed Dec 11, 2024
1 parent d19e3d6 commit a21f472
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/ghga_connector/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
from ghga_connector.core.downloading.batch_processing import FileStager
from ghga_connector.core.main import (
decrypt_file,
download_files,
download_file,
get_wps_token,
upload_file,
)
Expand Down Expand Up @@ -315,7 +315,7 @@ async def async_download(
staged_files = await stager.get_staged_files()
for file_id in staged_files:
message_display.display(f"Downloading file with id '{file_id}'...")
await download_files(
await download_file(
api_url=parameters.dcs_api_url,
client=client,
file_id=file_id,
Expand Down
2 changes: 1 addition & 1 deletion src/ghga_connector/core/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ async def upload_file( # noqa: PLR0913
message_display.success(f"File with id '{file_id}' has been successfully uploaded.")


async def download_files( # noqa: PLR0913
async def download_file( # noqa: PLR0913
*,
api_url: str,
client: httpx.AsyncClient,
Expand Down
7 changes: 1 addition & 6 deletions tests/unit/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,7 @@
from ghga_connector.core.api_calls import is_service_healthy


@pytest.fixture
def assert_all_responses_were_requested() -> bool:
"""Disable default behaviour"""
return False


@pytest.mark.httpx_mock(assert_all_responses_were_requested=False)
@pytest.mark.parametrize(
"api_url,timeout_in_seconds,expected_response",
[
Expand Down

0 comments on commit a21f472

Please sign in to comment.