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]

test(mcp): wrap over-long connection error message calls

mateo-berrid3268e4e184f
diff --git a/tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py b/tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py
index 51b946c11b7..e66101f6177 100644
--- a/tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py
+++ b/tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py
@@ -2954,11 +2954,15 @@ class TestConnectionErrorMessage:
assert secret not in message
def test_connect_error_points_at_reachability(self):
- message = rest_endpoints._connection_error_message(httpx.ConnectError("All connection attempts failed"), "https://example.com", 30.0)
+ message = rest_endpoints._connection_error_message(
+ httpx.ConnectError("All connection attempts failed"), "https://example.com", 30.0
+ )
assert "unreachable" in message.lower()
def test_timeout_error_message(self):
- message = rest_endpoints._connection_error_message(httpx.ConnectTimeout("timed out"), "https://example.com", 30.0)
+ message = rest_endpoints._connection_error_message(
+ httpx.ConnectTimeout("timed out"), "https://example.com", 30.0
+ )
assert "unreachable" in message.lower()
def test_http_status_error_includes_status_code(self):