(client: TestClient)
| 261 | |
| 262 | |
| 263 | def test_websocket_raise_http_exception(client: TestClient) -> None: |
| 264 | with pytest.raises(WebSocketDenialResponse) as exc: |
| 265 | with client.websocket_connect("/ws-raise-http"): |
| 266 | pass # pragma: no cover |
| 267 | assert exc.value.status_code == 401 |
| 268 | assert exc.value.content == b'{"detail":"Unauthorized"}' |
| 269 | |
| 270 | |
| 271 | def test_websocket_raise_custom_exception(client: TestClient) -> None: |
nothing calls this directly
no test coverage detected