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

Method test_client_sends_binary

tests/test_protocol.py:542–548  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

540 """
541
542 def test_client_sends_binary(self):
543 client = Protocol(CLIENT)
544 with patch("secrets.token_bytes", return_value=b"\x00\x00\x00\x00"):
545 client.send_binary(b"\x01\x02\xfe\xff")
546 self.assertEqual(
547 client.data_to_send(), [b"\x82\x84\x00\x00\x00\x00\x01\x02\xfe\xff"]
548 )
549
550 def test_server_sends_binary(self):
551 server = Protocol(SERVER)

Callers

nothing calls this directly

Calls 3

send_binaryMethod · 0.95
data_to_sendMethod · 0.95
ProtocolClass · 0.50

Tested by

no test coverage detected