Skip to content

Commit 0340602

Browse files
committed
fix: update coverage for 3.11 and 3.14
Signed-off-by: Samantha Coyle <sam@diagrid.io>
1 parent 23d8ee8 commit 0340602

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

tests/issues/test_streamable_http_405_get_stream.py

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -94,19 +94,18 @@ async def test_405_get_stream_does_not_hang(caplog: pytest.LogCaptureFixture):
9494
assert len(tools_result.tools) == 1
9595
assert tools_result.tools[0].name == "test_tool"
9696

97-
# Verify the 405 was logged and no retries occurred
98-
log_messages = [record.getMessage() for record in caplog.records]
99-
assert any(
100-
"Server does not support GET for SSE events (405 Method Not Allowed)" in msg
101-
for msg in log_messages
102-
), ( # pragma: no branch
103-
f"Expected 405 log message not found in: {log_messages}"
104-
)
105-
106-
reconnect_messages = [msg for msg in log_messages if "reconnecting" in msg.lower()]
107-
assert len(reconnect_messages) == 0, ( # pragma: no branch
108-
f"Should not retry on 405, but found: {reconnect_messages}"
109-
)
97+
# Verify the 405 was logged and no retries occurred
98+
log_messages = [record.getMessage() for record in caplog.records]
99+
assert any(
100+
"Server does not support GET for SSE events (405 Method Not Allowed)" in msg for msg in log_messages
101+
), ( # pragma: no branch
102+
f"Expected 405 log message not found in: {log_messages}"
103+
)
104+
105+
reconnect_messages = [msg for msg in log_messages if "reconnecting" in msg.lower()]
106+
assert len(reconnect_messages) == 0, ( # pragma: no branch
107+
f"Should not retry on 405, but found: {reconnect_messages}"
108+
)
110109

111110

112111
@pytest.mark.anyio

0 commit comments

Comments
 (0)