Exemplo n.º 1
0
 def test_receiving_a_frame_queues_it(self):
     s = Stream(1, None, None, None, None)
     s.receive_frame(Frame(0))
     assert len(s._queued_frames) == 1
Exemplo n.º 2
0
 def test_base_frame_ignores_flags(self):
     f = Frame(0)
     flags = f.parse_flags(0xFF)
     assert not flags
     assert isinstance(flags, set)
Exemplo n.º 3
0
 def test_base_frame_cant_serialize(self):
     f = Frame(0)
     with pytest.raises(NotImplementedError):
         f.serialize()
Exemplo n.º 4
0
 def test_base_frame_cant_parse_body(self):
     data = b''
     f = Frame(0)
     with pytest.raises(NotImplementedError):
         f.parse_body(data)