MCPcopy Index your code
hub / github.com/encode/starlette / WebSocketDenialResponse

Class WebSocketDenialResponse

starlette/testclient.py:92–99  ·  view source on GitHub ↗

A special case of `WebSocketDisconnect`, raised in the `TestClient` if the `WebSocket` is closed before being accepted with a `send_denial_response()`.

Source from the content-addressed store, hash-verified

90
91
92class WebSocketDenialResponse( # type: ignore[misc]
93 httpx.Response,
94 WebSocketDisconnect,
95):
96 """
97 A special case of `WebSocketDisconnect`, raised in the `TestClient` if the
98 `WebSocket` is closed before being accepted with a `send_denial_response()`.
99 """
100
101
102class WebSocketTestSession:

Callers 1

_raise_on_closeMethod · 0.85

Calls

no outgoing calls

Tested by 1

_raise_on_closeMethod · 0.68