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

Method test_mask_flag

tests/test_frames.py:147–157  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

145 self.parse(data, mask=False)
146
147 def test_mask_flag(self):
148 # Mask flag correctly set.
149 self.parse(b"\x80\x80\x00\x00\x00\x00", mask=True)
150 # Mask flag incorrectly unset.
151 with self.assertRaises(ProtocolError):
152 self.parse(b"\x80\x80\x00\x00\x00\x00", mask=False)
153 # Mask flag correctly unset.
154 self.parse(b"\x80\x00", mask=False)
155 # Mask flag incorrectly set.
156 with self.assertRaises(ProtocolError):
157 self.parse(b"\x80\x00", mask=True)
158
159 def test_control_frame_max_length(self):
160 # At maximum allowed length.

Callers

nothing calls this directly

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected