Пример #1
0
    def test_continuation_frame_serializes(self):
        f = ContinuationFrame(1)
        f.parse_flags(0xFF)
        f.data = b"hello world"

        s = f.serialize()
        assert s == (b"\x00\x0B\x0A\x04\x00\x00\x00\x01" + b"hello world")
Пример #2
0
    def test_continuation_frame_serializes(self):
        f = ContinuationFrame(1)
        f.parse_flags(0xFF)
        f.data = b'hello world'

        s = f.serialize()
        assert s == (b'\x00\x0B\x0A\x04\x00\x00\x00\x01' + b'hello world')
Пример #3
0
    def test_continuation_frame_flags(self):
        f = ContinuationFrame(1)
        flags = f.parse_flags(0xFF)

        assert flags == set(['END_HEADERS'])
Пример #4
0
    def test_continuation_frame_flags(self):
        f = ContinuationFrame(1)
        flags = f.parse_flags(0xFF)

        assert flags == set(['END_HEADERS'])