diff --git a/tests/test_litellm/proxy/test_aiohttp_cleanup_closed.py b/tests/test_litellm/proxy/test_aiohttp_cleanup_closed.py index c9b4d6475ab..dc0b8e9366e 100644 --- a/tests/test_litellm/proxy/test_aiohttp_cleanup_closed.py +++ b/tests/test_litellm/proxy/test_aiohttp_cleanup_closed.py @@ -12,7 +12,8 @@ def test_initialize_shared_aiohttp_session_sets_enable_cleanup_closed_when_neede monkeypatch.setattr(proxy_server_module, "AIOHTTP_NEEDS_CLEANUP_CLOSED", True) with patch( - "aiohttp.TCPConnector", return_value=connector_mock + "litellm.llms.custom_httpx.aiohttp_connector.HardenedTCPConnector", + return_value=connector_mock, ) as mock_tcp_connector: with patch("aiohttp.ClientSession", return_value=session_mock): asyncio.run(proxy_server_module._initialize_shared_aiohttp_session()) @@ -30,7 +31,8 @@ def test_initialize_shared_aiohttp_session_omits_enable_cleanup_closed_when_not_ monkeypatch.setattr(proxy_server_module, "AIOHTTP_NEEDS_CLEANUP_CLOSED", False) with patch( - "aiohttp.TCPConnector", return_value=connector_mock + "litellm.llms.custom_httpx.aiohttp_connector.HardenedTCPConnector", + return_value=connector_mock, ) as mock_tcp_connector: with patch("aiohttp.ClientSession", return_value=session_mock): asyncio.run(proxy_server_module._initialize_shared_aiohttp_session())