From 4028d6a70cc4e98aec34dbcbaf924707c1c2434a Mon Sep 17 00:00:00 2001 From: "Thomas J. Zajac" Date: Wed, 11 Dec 2024 15:00:53 +0000 Subject: [PATCH] Managing httpx expectations --- tests/integration/test_cli.py | 1 + tests/unit/test_core.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/integration/test_cli.py b/tests/integration/test_cli.py index 89855f4..fd0787a 100644 --- a/tests/integration/test_cli.py +++ b/tests/integration/test_cli.py @@ -72,6 +72,7 @@ pytest.mark.asyncio, pytest.mark.httpx_mock( assert_all_responses_were_requested=False, + assert_all_requests_were_expected=False, can_send_already_matched_responses=True, should_mock=lambda request: request.url.host not in unintercepted_hosts, ), diff --git a/tests/unit/test_core.py b/tests/unit/test_core.py index e904d37..0de25d6 100644 --- a/tests/unit/test_core.py +++ b/tests/unit/test_core.py @@ -22,7 +22,10 @@ from ghga_connector.core.api_calls import is_service_healthy -@pytest.mark.httpx_mock(assert_all_responses_were_requested=False) +@pytest.mark.httpx_mock( + assert_all_responses_were_requested=False, + assert_all_requests_were_expected=False, +) @pytest.mark.parametrize( "api_url,timeout_in_seconds,expected_response", [