Esempio n. 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")
Esempio n. 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')
Esempio n. 3
0
    def test_continuation_frame_flags(self):
        f = ContinuationFrame(1)
        flags = f.parse_flags(0xFF)

        assert flags == set(['END_HEADERS'])
Esempio n. 4
0
    def test_continuation_frame_flags(self):
        f = ContinuationFrame(1)
        flags = f.parse_flags(0xFF)

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