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 arize config tests

Ishaan Jaff33f11f1479e0
diff --git a/tests/litellm/integrations/arize/test_arize_phoenix.py b/tests/litellm/integrations/arize/test_arize_phoenix.py
index cc03fe00310..4f2fb3b9d53 100644
--- a/tests/litellm/integrations/arize/test_arize_phoenix.py
+++ b/tests/litellm/integrations/arize/test_arize_phoenix.py
@@ -18,7 +18,9 @@ class TestArizePhoenixConfig(unittest.TestCase):
config = ArizePhoenixLogger.get_arize_phoenix_config()
# Verify the configuration
- self.assertEqual(config.otlp_auth_headers, "Authorization=Bearer test_api_key")
+ self.assertEqual(
+ config.otlp_auth_headers, "Authorization=Bearer%20test_api_key"
+ )
self.assertEqual(config.endpoint, "http://test.endpoint")
self.assertEqual(config.protocol, "otlp_http")
@@ -34,7 +36,9 @@ class TestArizePhoenixConfig(unittest.TestCase):
config = ArizePhoenixLogger.get_arize_phoenix_config()
# Verify the configuration
- self.assertEqual(config.otlp_auth_headers, "Authorization=Bearer test_api_key")
+ self.assertEqual(
+ config.otlp_auth_headers, "Authorization=Bearer%20test_api_key"
+ )
self.assertEqual(config.endpoint, "grpc://test.endpoint")
self.assertEqual(config.protocol, "otlp_grpc")
diff --git a/tests/local_testing/test_arize_phoenix.py b/tests/local_testing/test_arize_phoenix.py
index 21a23bf047e..920b5ac04d2 100644
--- a/tests/local_testing/test_arize_phoenix.py
+++ b/tests/local_testing/test_arize_phoenix.py
@@ -48,14 +48,14 @@ async def test_async_otel_callback():
),
pytest.param(
{"PHOENIX_COLLECTOR_HTTP_ENDPOINT": "http://localhost:4318", "PHOENIX_COLLECTOR_ENDPOINT": "http://localhost:4317", "PHOENIX_API_KEY": "test_api_key"},
- "Authorization=Bearer test_api_key",
+ "Authorization=Bearer%20test_api_key",
"http://localhost:4318",
"otlp_http",
id="prioritize http if both endpoints are set",
),
pytest.param(
{"PHOENIX_COLLECTOR_ENDPOINT": "https://localhost:6006", "PHOENIX_API_KEY": "test_api_key"},
- "Authorization=Bearer test_api_key",
+ "Authorization=Bearer%20test_api_key",
"https://localhost:6006",
"otlp_grpc",
id="custom grpc endpoint",
@@ -69,7 +69,7 @@ async def test_async_otel_callback():
),
pytest.param(
{"PHOENIX_COLLECTOR_HTTP_ENDPOINT": "https://localhost:6006", "PHOENIX_API_KEY": "test_api_key"},
- "Authorization=Bearer test_api_key",
+ "Authorization=Bearer%20test_api_key",
"https://localhost:6006",
"otlp_http",
id="custom http endpoint",