http2: add push-promise metadata test

This commit is contained in:
Thomas Kriechbaumer 2016-11-05 05:07:35 +01:00
parent d4071d3337
commit 184e29e119

View File

@ -737,6 +737,9 @@ class TestPushPromise(_Http2Test):
assert b'pushed_stream_foo' in bodies assert b'pushed_stream_foo' in bodies
assert b'pushed_stream_bar' 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): def test_push_promise_reset(self):
client, h2_conn = self._setup_connection() client, h2_conn = self._setup_connection()
@ -788,6 +791,9 @@ class TestPushPromise(_Http2Test):
assert b'regular_stream' in bodies assert b'regular_stream' in bodies
# the other two bodies might not be transmitted before the reset # 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 @requires_alpn
class TestConnectionLost(_Http2Test): class TestConnectionLost(_Http2Test):