SSE should work with POST (needed for MCP compatibility).
(client: TestClient)
| 170 | |
| 171 | |
| 172 | def test_post_method_sse(client: TestClient): |
| 173 | """SSE should work with POST (needed for MCP compatibility).""" |
| 174 | response = client.post("/items/stream-post") |
| 175 | assert response.status_code == 200 |
| 176 | assert response.headers["content-type"] == "text/event-stream; charset=utf-8" |
| 177 | data_lines = [ |
| 178 | line for line in response.text.strip().split("\n") if line.startswith("data: ") |
| 179 | ] |
| 180 | assert len(data_lines) == 3 |
| 181 | |
| 182 | |
| 183 | def test_sse_events_with_fields(client: TestClient): |
nothing calls this directly
no test coverage detected
searching dependent graphs…