style(tests): format openai params strip test and fix async warnings

This commit is contained in:
mutnale_sushant 2026-07-20 10:58:43 +05:30
parent 61689220f9
commit b7388e3aaa

View file

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