MCPcopy Create free account
hub / github.com/aio-libs/aiohttp / test_parse_frame_mask

Function test_parse_frame_mask

tests/test_websocket_parser.py:215–220  ·  view source on GitHub ↗
(parser: PatchableWebSocketReader)

Source from the content-addressed store, hash-verified

213
214
215def test_parse_frame_mask(parser: PatchableWebSocketReader) -> None:
216 parser.parse_frame(struct.pack("!BB", 0b00000001, 0b10000001))
217 parser.parse_frame(b"0001")
218 fin, opcode, payload, compress = parser.parse_frame(b"1")[0]
219
220 assert (0, 1, b"\x01", 0) == (fin, opcode, payload, compress)
221
222
223def test_parse_frame_header_reversed_bits(

Callers

nothing calls this directly

Calls 1

parse_frameMethod · 0.80

Tested by

no test coverage detected