From b7388e3aaa18dbeab5e20ecfc9870091cb973314 Mon Sep 17 00:00:00 2001 From: mutnale_sushant Date: Mon, 20 Jul 2026 10:58:43 +0530 Subject: [PATCH] style(tests): format openai params strip test and fix async warnings --- tests/test_litellm/test_openai_params_strip.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/test_litellm/test_openai_params_strip.py b/tests/test_litellm/test_openai_params_strip.py index b2c2a2614a1..a558470823b 100644 --- a/tests/test_litellm/test_openai_params_strip.py +++ b/tests/test_litellm/test_openai_params_strip.py @@ -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():