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

Method test_connection

tests/asyncio/test_server.py:591–596  ·  view source on GitHub ↗

Server receives connection from client over a Unix socket.

(self)

Source from the content-addressed store, hash-verified

589@unittest.skipUnless(hasattr(socket, "AF_UNIX"), "this test requires Unix sockets")
590class UnixServerTests(EvalShellMixin, unittest.IsolatedAsyncioTestCase):
591 async def test_connection(self):
592 """Server receives connection from client over a Unix socket."""
593 with temp_unix_socket_path() as path:
594 async with unix_serve(handler, path):
595 async with unix_connect(path) as client:
596 await self.assertEval(client, "ws.protocol.state.name", "OPEN")
597
598
599@unittest.skipUnless(hasattr(socket, "AF_UNIX"), "this test requires Unix sockets")

Callers

nothing calls this directly

Calls 4

unix_connectFunction · 0.90
temp_unix_socket_pathFunction · 0.85
unix_serveFunction · 0.50
assertEvalMethod · 0.45

Tested by

no test coverage detected