Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Commit 9261e25

Browse files
committed
Further RST_STREAM testing.
1 parent 8f621a2 commit 9261e25

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/test_hyper.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,15 @@ def test_rst_stream_frame_parses_properly(self):
128128
assert f.flags == set()
129129
assert f.error_code == 420
130130

131+
def test_rst_stream_frame_comes_on_a_stream(self):
132+
with pytest.raises(ValueError):
133+
RstStreamFrame(0)
134+
135+
def test_rst_stream_frame_must_have_body_length_four(self):
136+
f = RstStreamFrame(1)
137+
with pytest.raises(ValueError):
138+
f.parse_body(b'\x01')
139+
131140

132141
class TestSettingsFrame(object):
133142
def test_settings_frame_has_only_one_flag(self):

0 commit comments

Comments
 (0)