from app.api.controllers.agent_runs import accepts_event_stream def test_sse_accept_negotiation() -> None: assert accepts_event_stream(None) assert accepts_event_stream("text/event-stream") assert accepts_event_stream("application/json, text/*;q=0.5") assert not accepts_event_stream("application/json") assert not accepts_event_stream("text/event-stream;q=0")