(self)
| 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. |