Client connects using a pre-existing socket.
(self)
| 41 | self.assertEqual(client.protocol.state.name, "OPEN") |
| 42 | |
| 43 | def test_existing_socket(self): |
| 44 | """Client connects using a pre-existing socket.""" |
| 45 | with run_server() as server: |
| 46 | with socket.create_connection(server.socket.getsockname()) as sock: |
| 47 | # Use a non-existing domain to ensure we connect to sock. |
| 48 | with connect("ws://invalid/", sock=sock) as client: |
| 49 | self.assertEqual(client.protocol.state.name, "OPEN") |
| 50 | |
| 51 | def test_compression_is_enabled(self): |
| 52 | """Client enables compression by default.""" |
nothing calls this directly
no test coverage detected