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

Method assertFrameReceived

tests/test_protocol.py:57–66  ·  view source on GitHub ↗

Incoming data for ``connection`` contains the given frame. ``frame`` may be ``None`` if no frame is expected.

(self, connection, frame)

Source from the content-addressed store, hash-verified

55 self.assertEqual(frames_sent, frames_expected)
56
57 def assertFrameReceived(self, connection, frame):
58 """
59 Incoming data for ``connection`` contains the given frame.
60
61 ``frame`` may be ``None`` if no frame is expected.
62
63 """
64 frames_received = connection.events_received()
65 frames_expected = [] if frame is None else [frame]
66 self.assertEqual(frames_received, frames_expected)
67
68 def assertConnectionClosing(self, connection, code=None, reason=""):
69 """

Calls 1

events_receivedMethod · 0.80

Tested by

no test coverage detected