From b7d063d708834444cdddd93a80a8b2714bb092f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20K=C3=B6tter?= Date: Sat, 21 Dec 2024 07:41:38 +0100 Subject: [PATCH] tests --- tests/error_test.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/error_test.py b/tests/error_test.py index ef8cba5b..7a1b7981 100644 --- a/tests/error_test.py +++ b/tests/error_test.py @@ -7,8 +7,8 @@ import pytest -def test_response_error(httpx_mock, with_paths_response_error): - api = OpenAPI("/", with_paths_response_error, session_factory=httpx.Client) +def test_response_error(httpx_mock, with_paths_response_error_vXX): + api = OpenAPI("/", with_paths_response_error_vXX, session_factory=httpx.Client) httpx_mock.add_response(headers={"Content-Type": "application/json"}, status_code=200, json="ok") r = api._.test() @@ -35,7 +35,7 @@ def test_response_error(httpx_mock, with_paths_response_error): str(e.value) -def test_request_error(with_paths_response_error): +def test_request_error(with_paths_response_error_vXX): class Client(httpx.Client): def __init__(self, *args, **kwargs): super().__init__(*args, transport=RaisingTransport(), **kwargs) @@ -44,7 +44,7 @@ class RaisingTransport(httpx.BaseTransport): def handle_request(self, request): raise httpx.TimeoutException(message="timeout") - api = OpenAPI("/", with_paths_response_error, session_factory=Client) + api = OpenAPI("/", with_paths_response_error_vXX, session_factory=Client) with pytest.raises(RequestError) as e: api._.test()