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

Method test_no_origin_accepted

tests/test_server.py:676–684  ·  view source on GitHub ↗

Handshake succeeds when the lack of an origin is accepted.

(self)

Source from the content-addressed store, hash-verified

674 )
675
676 def test_no_origin_accepted(self):
677 """Handshake succeeds when the lack of an origin is accepted."""
678 server = ServerProtocol(origins=[None])
679 request = make_request()
680 response = server.accept(request)
681 server.send_response(response)
682
683 self.assertHandshakeSuccess(server)
684 self.assertIsNone(server.origin)
685
686 def test_no_extensions(self):
687 """Handshake succeeds without extensions."""

Callers

nothing calls this directly

Calls 5

acceptMethod · 0.95
send_responseMethod · 0.95
ServerProtocolClass · 0.85
make_requestFunction · 0.85

Tested by

no test coverage detected