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

Method test_bad_opcode

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

Source from the content-addressed store, hash-verified

138 self.parse(data, mask=False) # does not raise an exception
139
140 def test_bad_opcode(self):
141 for opcode in list(range(0x03, 0x08)) + list(range(0x0B, 0x10)):
142 data = bytes([0x80 | opcode, 0])
143 with self.subTest(data=data):
144 with self.assertRaises(ProtocolError):
145 self.parse(data, mask=False)
146
147 def test_mask_flag(self):
148 # Mask flag correctly set.

Callers

nothing calls this directly

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected