コード例 #1
0
ファイル: test_frames.py プロジェクト: asraa/hyperframe
 def test_ping_frame_has_no_less_than_body_length_8(self):
     f = PingFrame()
     with pytest.raises(ValueError):
         f.parse_body(b'\x01\x02\x03\x04\x05\x06\x07')
コード例 #2
0
 def test_ping_frame_has_no_more_than_body_length_8(self):
     f = PingFrame(0)
     with pytest.raises(ValueError):
         f.parse_body(b'\x01\x02\x03\x04\x05\x06\x07\x08\x09')
コード例 #3
0
 def test_ping_frame_has_no_more_than_body_length_8(self):
     f = PingFrame()
     with pytest.raises(InvalidFrameError):
         f.parse_body(b'\x01\x02\x03\x04\x05\x06\x07\x08\x09')