Using starlette 's TestClient and routing primitives, implement a WebSocketEchoRouter — a function that…
Using starlette 's TestClient and routing primitives, implement a WebSocketEchoRouter — a function that…: a task in repo2rlenv-code-instruct (Harbor dataset). Both routes must properly handle the WebSocket lifecycle (accept, receive, send, disconnect). The returned app should be directly testable…
The task
Both routes must properly handle the WebSocket lifecycle (accept, receive, send, disconnect). The returned app should be directly testable via `starlette.testclient.TestClient`.
Part of FineEnvs/repo2rlenv-code-instruct.