From ef3ec4f6bc60995002996e71af352db8639df91c Mon Sep 17 00:00:00 2001 From: Konstantin Date: Sat, 5 Sep 2026 17:48:51 +0300 Subject: [PATCH] test(hubris): use monkeypatch for disable_aiohttp_transport (TQ005) --- .../test_litellm/llms/openai_like/test_hubris_provider.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/test_litellm/llms/openai_like/test_hubris_provider.py b/tests/test_litellm/llms/openai_like/test_hubris_provider.py index c963285ecda..4f1d792abb7 100644 --- a/tests/test_litellm/llms/openai_like/test_hubris_provider.py +++ b/tests/test_litellm/llms/openai_like/test_hubris_provider.py @@ -147,11 +147,9 @@ class TestHubrisDynamicConfig: class TestHubrisCompletion: @pytest.fixture(autouse=True) - def _disable_aiohttp(self): - original = getattr(litellm, "disable_aiohttp_transport", False) - litellm.disable_aiohttp_transport = True - yield - litellm.disable_aiohttp_transport = original + def _disable_aiohttp(self, monkeypatch): + # respx mocks the httpx transport, so the aiohttp transport must be off. + monkeypatch.setattr(litellm, "disable_aiohttp_transport", True) @pytest.mark.respx() def test_completion_sends_correct_url_and_body(self, respx_mock):