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):