Skip to content

Commit 4048bfc

Browse files
comment for test
1 parent b51026c commit 4048bfc

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

tests/client/test_notification_response.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,10 @@ def non_sdk_server(non_sdk_server_port: int) -> Generator[None, None, None]:
115115

116116
@pytest.mark.anyio
117117
async def test_notification_with_204_response(non_sdk_server: None, non_sdk_server_port: int) -> None:
118-
"""Test that client handles 204 responses to notifications correctly.
119-
120-
This test verifies the fix for the issue where non-SDK servers
121-
might return 204 No Content for notifications instead of 202 Accepted.
122-
The client should handle this gracefully without trying to parse
123-
the response body.
118+
"""
119+
This test verifies that the client does not parse responses to non-JsonRPCRequests, which matches the
120+
behavior of the TypeScript SDK. The test uses a 204 No Content (commonly seen from servers), but in reality
121+
any 2xx response should be handled the same way.
124122
"""
125123
server_url = f"http://127.0.0.1:{non_sdk_server_port}/mcp"
126124
returned_exception = None

0 commit comments

Comments
 (0)