Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

fix: tests

Ishaan Jaff6863073aa40b
diff --git a/tests/test_litellm/llms/custom_httpx/test_http_handler.py b/tests/test_litellm/llms/custom_httpx/test_http_handler.py
index 72ff0b0f447..75fb0b92984 100644
--- a/tests/test_litellm/llms/custom_httpx/test_http_handler.py
+++ b/tests/test_litellm/llms/custom_httpx/test_http_handler.py
@@ -20,7 +20,6 @@ from litellm.llms.custom_httpx.http_handler import AsyncHTTPHandler, HTTPHandler
@pytest.mark.asyncio
async def test_ssl_security_level(monkeypatch):
# Set environment variable for SSL security level
- litellm.use_aiohttp_transport = True
monkeypatch.setenv("SSL_SECURITY_LEVEL", "DEFAULT@SECLEVEL=1")
# Create async client with SSL verification disabled to isolate SSL context testing
@@ -68,7 +67,6 @@ async def test_force_ipv4_transport():
async def test_ssl_context_transport():
"""Test transport creation with SSL context"""
# Create a test SSL context
- litellm.use_aiohttp_transport = True
ssl_context = ssl.create_default_context()
transport = AsyncHTTPHandler._create_async_transport(ssl_context=ssl_context)
@@ -106,7 +104,6 @@ async def test_ssl_verification_with_aiohttp_transport():
import aiohttp
# Create a test SSL context
- litellm.use_aiohttp_transport = True
litellm_async_client = AsyncHTTPHandler(ssl_verify=False)
transport_connector = (
diff --git a/tests/test_litellm/test_main.py b/tests/test_litellm/test_main.py
index 7b5349fffb1..e69292f5693 100644
--- a/tests/test_litellm/test_main.py
+++ b/tests/test_litellm/test_main.py
@@ -356,9 +356,7 @@ async def test_openai_env_base(
respx_mock: respx.MockRouter, env_base, openai_api_response, monkeypatch
):
"This tests OpenAI env variables are honored, including legacy OPENAI_API_BASE"
- litellm.use_aiohttp_transport = (
- False # since this uses respx, we need to set use_aiohttp_transport to False
- )
+ litellm.disable_aiohttp_transport = True
expected_base_url = "http://localhost:12345/v1"