mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2025-02-01 07:49:10 +00:00
http2: fix tests
This commit is contained in:
parent
3e3b59aa71
commit
daf512ce93
@ -246,9 +246,9 @@ def test_priority_frame_to_bytes():
|
||||
flags=(Frame.FLAG_NO_FLAGS),
|
||||
stream_id=0x1234567,
|
||||
exclusive=True,
|
||||
stream_dependency=0x7654321,
|
||||
stream_dependency=0x0,
|
||||
weight=42)
|
||||
assert_equal(f.to_bytes().encode('hex'), '000005020001234567876543212a')
|
||||
assert_equal(f.to_bytes().encode('hex'), '000005020001234567800000002a')
|
||||
|
||||
f = PriorityFrame(
|
||||
length=5,
|
||||
@ -266,13 +266,6 @@ def test_priority_frame_to_bytes():
|
||||
stream_dependency=0x1234567)
|
||||
tutils.raises(ValueError, f.to_bytes)
|
||||
|
||||
f = PriorityFrame(
|
||||
length=5,
|
||||
flags=Frame.FLAG_NO_FLAGS,
|
||||
stream_id=0x1234567,
|
||||
stream_dependency=0x0)
|
||||
tutils.raises(ValueError, f.to_bytes)
|
||||
|
||||
|
||||
def test_priority_frame_from_bytes():
|
||||
f = Frame.from_file(hex_to_file('000005020001234567876543212a'))
|
||||
|
Loading…
Reference in New Issue
Block a user