mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-21 00:21:49 +00:00
style(tests): format openai params strip test and fix async warnings
This commit is contained in:
parent
61689220f9
commit
b7388e3aaa
1 changed files with 8 additions and 1 deletions
|
|
@ -14,7 +14,7 @@ litellm.return_response_headers = False
|
|||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def clear_client_cache():
|
||||
async def clear_client_cache():
|
||||
"""
|
||||
Clear the HTTP client cache before each test to ensure mocks are used.
|
||||
This prevents cached real clients from being reused across tests.
|
||||
|
|
@ -26,6 +26,13 @@ def clear_client_cache():
|
|||
if cache is not None:
|
||||
cache.flush_cache()
|
||||
|
||||
from litellm.litellm_core_utils.logging_worker import GLOBAL_LOGGING_WORKER
|
||||
|
||||
try:
|
||||
await GLOBAL_LOGGING_WORKER.clear_queue()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_openai_chat_completion_params_strip():
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue