mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
test(hubris): use monkeypatch for disable_aiohttp_transport (TQ005)
This commit is contained in:
parent
20e6078c40
commit
ef3ec4f6bc
1 changed files with 3 additions and 5 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue