From 88f59e1465ae55097abc3520e1f6d271b5f39bbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?d=20=F0=9F=94=B9?= <258577966+voidborne-d@users.noreply.github.com> Date: Wed, 18 Mar 2026 00:54:23 +0000 Subject: [PATCH] fix: use AsyncMock for concurrent test consistency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Address review feedback from greptile — use new_callable=AsyncMock on the concurrent test's patch.object to ensure the mock is properly typed as async, even though side_effect already handles the coroutine. --- tests/test_litellm/proxy/test_aiohttp_session_recovery.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_litellm/proxy/test_aiohttp_session_recovery.py b/tests/test_litellm/proxy/test_aiohttp_session_recovery.py index f089d10425c..29bd9a491b7 100644 --- a/tests/test_litellm/proxy/test_aiohttp_session_recovery.py +++ b/tests/test_litellm/proxy/test_aiohttp_session_recovery.py @@ -167,6 +167,7 @@ async def test_add_shared_session_concurrent_recreation_uses_lock(): with patch.object( proxy_server_module, "_initialize_shared_aiohttp_session", + new_callable=AsyncMock, side_effect=mock_init, ): # Launch 5 concurrent calls