MCPcopy Create free account
hub / github.com/python-websockets/websockets / last_sent_frame

Method last_sent_frame

tests/legacy/test_protocol.py:290–301  ·  view source on GitHub ↗

Read the last frame sent to the transport. This method assumes that at most one frame was sent. It raises an AssertionError otherwise.

(self)

Source from the content-addressed store, hash-verified

288 return frames
289
290 def last_sent_frame(self):
291 """
292 Read the last frame sent to the transport.
293
294 This method assumes that at most one frame was sent. It raises an
295 AssertionError otherwise.
296
297 """
298 frames = self.sent_frames()
299 if frames:
300 assert len(frames) == 1
301 return frames[0]
302
303 def assertFramesSent(self, *frames):
304 self.assertEqual(self.sent_frames(), [Frame(*args) for args in frames])

Calls 1

sent_framesMethod · 0.95

Tested by

no test coverage detected