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

Method test_bad_opcode

tests/legacy/test_framing.py:124–129  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

122 self.decode(encoded) # does not raise an exception
123
124 def test_bad_opcode(self):
125 for opcode in list(range(0x03, 0x08)) + list(range(0x0B, 0x10)):
126 encoded = bytes([0x80 | opcode, 0])
127 with self.subTest(encoded=encoded):
128 with self.assertRaises(ProtocolError):
129 self.decode(encoded)
130
131 def test_mask_flag(self):
132 # Mask flag correctly set.

Callers

nothing calls this directly

Calls 1

decodeMethod · 0.95

Tested by

no test coverage detected