A stream whose first event is an error.
()
| 777 | |
| 778 | |
| 779 | def stream_error_response() -> httpx2.Response: |
| 780 | """A stream whose first event is an error.""" |
| 781 | error = {"type": "error", "error": {"type": "overloaded_error", "message": "Overloaded"}} |
| 782 | return httpx2.Response( |
| 783 | 200, headers={"content-type": "text/event-stream"}, content=f"event: error\ndata: {json.dumps(error)}\n\n" |
| 784 | ) |
| 785 | |
| 786 | |
| 787 | TURN_METHODS = pytest.mark.parametrize("method", ["send", "parse", "stream"]) |
no outgoing calls