The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(gateway): align SSE prepare cleanup with retained streams
Brian Fernstromc0230ca59555
diff --git a/tests/gateway/test_api_server_runs.py b/tests/gateway/test_api_server_runs.pyindex 3549c3d3c5f..86d307b4da6 100644--- a/tests/gateway/test_api_server_runs.py+++ b/tests/gateway/test_api_server_runs.py@@ -679,11 +679,12 @@ class TestRunEvents:raise RuntimeError("prepare failed")with patch.object(api_server_runs.web, "StreamResponse", FailingResponse):- await api_server_runs._handle_run_events(- adapter, request, _api_server=api_server_module)+ with pytest.raises(RuntimeError, match="prepare failed"):+ await api_server_runs._handle_run_events(+ adapter, request, _api_server=api_server_module)assert stream.subscribers == set()- assert run_id not in adapter._run_streams+ assert adapter._run_streams[run_id] is stream@pytest.mark.asyncioasync def test_two_subscribers_each_receive_every_event_and_survive_one_disconnect(self, adapter):