diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2016-11-05 05:07:35 +0100 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2016-11-05 05:13:36 +0100 |
commit | 184e29e119a56762af7cb71cc872af12f92778e8 (patch) | |
tree | 612adcddef8f8450c0df577954369ba88be8b343 | |
parent | d4071d3337d38199316f5f5b99093c9a374ca8ec (diff) | |
download | mitmproxy-184e29e119a56762af7cb71cc872af12f92778e8.tar.gz mitmproxy-184e29e119a56762af7cb71cc872af12f92778e8.tar.bz2 mitmproxy-184e29e119a56762af7cb71cc872af12f92778e8.zip |
http2: add push-promise metadata test
-rw-r--r-- | test/mitmproxy/protocol/test_http2.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/mitmproxy/protocol/test_http2.py b/test/mitmproxy/protocol/test_http2.py index e4283e3f..4159686a 100644 --- a/test/mitmproxy/protocol/test_http2.py +++ b/test/mitmproxy/protocol/test_http2.py @@ -737,6 +737,9 @@ class TestPushPromise(_Http2Test): assert b'pushed_stream_foo' in bodies assert b'pushed_stream_bar' in bodies + pushed_flows = [flow for flow in self.master.state.flows if 'h2-pushed-stream' in flow.metadata] + assert len(pushed_flows) == 2 + def test_push_promise_reset(self): client, h2_conn = self._setup_connection() @@ -788,6 +791,9 @@ class TestPushPromise(_Http2Test): assert b'regular_stream' in bodies # the other two bodies might not be transmitted before the reset + pushed_flows = [flow for flow in self.master.state.flows if 'h2-pushed-stream' in flow.metadata] + assert len(pushed_flows) == 2 + @requires_alpn class TestConnectionLost(_Http2Test): |