File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed
src/crewai/mcp/transports Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,6 @@ async def connect(self) -> Self:
6666 self ._transport_context = sse_client (
6767 self .url ,
6868 headers = self .headers if self .headers else None ,
69- terminate_on_close = True ,
7069 )
7170
7271 read , write = await self ._transport_context .__aenter__ ()
Original file line number Diff line number Diff line change 1+ """Tests for SSE transport."""
2+
3+ import pytest
4+
5+ from crewai .mcp .transports .sse import SSETransport
6+
7+
8+ @pytest .mark .asyncio
9+ async def test_sse_transport_connect_does_not_pass_invalid_args ():
10+ """Test that SSETransport.connect() doesn't pass invalid args to sse_client.
11+
12+ The sse_client function does not accept terminate_on_close parameter.
13+ """
14+ transport = SSETransport (
15+ url = "http://localhost:9999/sse" ,
16+ headers = {"Authorization" : "Bearer test" },
17+ )
18+
19+ with pytest .raises (ConnectionError ) as exc_info :
20+ await transport .connect ()
21+
22+ assert "unexpected keyword argument" not in str (exc_info .value )
You can’t perform that action at this time.
0 commit comments