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