File tree Expand file tree Collapse file tree 1 file changed +13
-12
lines changed
Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -94,18 +94,19 @@ 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 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- )
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+ )
109110
110111
111112@pytest .mark .anyio
You can’t perform that action at this time.
0 commit comments