Tests fully pass again

This commit is contained in:
Donkie
2024-05-23 20:13:51 +02:00
parent 535fa40ad2
commit c851950701
5 changed files with 14 additions and 6 deletions

View File

@@ -297,3 +297,9 @@ def assert_httpx_success(response: httpx.Response) -> None:
"""Assert that a response is successful."""
if not response.is_success:
pytest.fail(f"Request failed: {response.status_code} {response.text}")
def assert_httpx_code(response: httpx.Response, code: int) -> None:
"""Assert that a response has the expected status code."""
if response.status_code != code:
pytest.fail(f"Request failed: {response.status_code} {response.text}")