From 184e29e119a56762af7cb71cc872af12f92778e8 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Sat, 5 Nov 2016 05:07:35 +0100 Subject: http2: add push-promise metadata test --- test/mitmproxy/protocol/test_http2.py | 6 ++++++ 1 file changed, 6 insertions(+) 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): -- cgit v1.2.3