Client connects using a pre-existing socket.
(self)
| 72 | self.assertEqual(client.protocol.state.name, "OPEN") |
| 73 | |
| 74 | async def test_existing_socket(self): |
| 75 | """Client connects using a pre-existing socket.""" |
| 76 | async with serve(*args) as server: |
| 77 | with socket.create_connection(get_host_port(server)) as sock: |
| 78 | # Use a non-existing domain to ensure we connect to sock. |
| 79 | async with connect("ws://invalid/", sock=sock) as client: |
| 80 | self.assertEqual(client.protocol.state.name, "OPEN") |
| 81 | |
| 82 | async def test_compression_is_enabled(self): |
| 83 | """Client enables compression by default.""" |
nothing calls this directly
no test coverage detected