Server receives connection using a pre-existing socket.
(self)
| 62 | ) |
| 63 | |
| 64 | async def test_existing_socket(self): |
| 65 | """Server receives connection using a pre-existing socket.""" |
| 66 | with socket.create_server(("localhost", 0)) as sock: |
| 67 | host, port = sock.getsockname() |
| 68 | async with serve(handler, sock=sock): |
| 69 | async with connect(f"ws://{host}:{port}/") as client: |
| 70 | await self.assertEval(client, "ws.protocol.state.name", "OPEN") |
| 71 | |
| 72 | async def test_select_subprotocol(self): |
| 73 | """Server selects a subprotocol with the select_subprotocol callable.""" |
nothing calls this directly
no test coverage detected