Skip to content

Commit e166ba7

Browse files
committed
docs: improve test docstring for unexpected content type test
- Add more detailed description of what the test verifies - Clarify that it tests HTML response handling - Trigger CI checks for PR validation
1 parent 5c960e8 commit e166ba7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/shared/test_streamable_http.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1606,7 +1606,11 @@ async def bad_client():
16061606

16071607
@pytest.mark.anyio
16081608
async def test_client_unexpected_content_type_raises_mcp_error():
1609-
"""Test that unexpected content types raise McpError instead of just printing."""
1609+
"""Test that unexpected content types raise McpError instead of just printing.
1610+
1611+
This test verifies that when a server returns HTML instead of MCP JSON,
1612+
the client properly raises McpError wrapped in ExceptionGroup.
1613+
"""
16101614
# Use a real server that returns HTML to test the actual behavior
16111615
from starlette.responses import HTMLResponse
16121616
from starlette.routing import Route

0 commit comments

Comments
 (0)