Function
websocket_endpoint_decorated
tests/test_authentication.py:176–184
· tests/test_authentication.py::websocket_endpoint_decorated
(websocket: WebSocket, additional: str)
Source from the content-addressed store, hash-verified
| 174 | @ws_inject_decorator(additional=class="st">"payload") |
| 175 | @requires(class="st">"authenticated") |
| 176 | async def websocket_endpoint_decorated(websocket: WebSocket, additional: str) -> None: |
| 177 | await websocket.accept() |
| 178 | await websocket.send_json( |
| 179 | { |
| 180 | class="st">"authenticated": websocket.user.is_authenticated, |
| 181 | class="st">"user": websocket.user.display_name, |
| 182 | class="st">"additional": additional, |
| 183 | } |
| 184 | ) |
| 185 | |
| 186 | |
| 187 | app = Starlette( |
Callers
nothing calls this directly
Tested by
no test coverage detected