MCPcopy Index your code
hub / github.com/python-websockets/websockets / test_connection

Method test_connection

tests/sync/test_client.py:601–606  ·  view source on GitHub ↗

Client connects to server over a Unix socket.

(self)

Source from the content-addressed store, hash-verified

599@unittest.skipUnless(hasattr(socket, "AF_UNIX"), "this test requires Unix sockets")
600class UnixClientTests(unittest.TestCase):
601 def test_connection(self):
602 """Client connects to server over a Unix socket."""
603 with temp_unix_socket_path() as path:
604 with run_unix_server(path):
605 with unix_connect(path) as client:
606 self.assertEqual(client.protocol.state.name, "OPEN")
607
608 def test_set_host_header(self):
609 """Client sets the Host header to the host in the WebSocket URI."""

Callers

nothing calls this directly

Calls 3

temp_unix_socket_pathFunction · 0.85
run_unix_serverFunction · 0.85
unix_connectFunction · 0.50

Tested by

no test coverage detected