From 7b10817670b30550dd45af48491ed8cf3cacd5e6 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Thu, 30 Jul 2015 13:52:13 +0200 Subject: http2: improve protocol --- test/http/http2/test_protocol.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'test/http') diff --git a/test/http/http2/test_protocol.py b/test/http/http2/test_protocol.py index 5febc480..b2d414d1 100644 --- a/test/http/http2/test_protocol.py +++ b/test/http/http2/test_protocol.py @@ -222,7 +222,7 @@ class TestAssembleRequest(): bytes = http2.HTTP2Protocol(self.c).assemble_request(http.Request( '', 'GET', - '', + 'https', '', '', '/', @@ -237,7 +237,7 @@ class TestAssembleRequest(): bytes = http2.HTTP2Protocol(self.c).assemble_request(http.Request( '', 'GET', - '', + 'https', '', '', '/', @@ -269,11 +269,12 @@ class TestReadResponse(tservers.ServerTestBase): c.connect() c.convert_to_ssl() protocol = http2.HTTP2Protocol(c) + protocol.connection_preface_performed = True resp = protocol.read_response() assert resp.httpversion == (2, 0) - assert resp.status_code == "200" + assert resp.status_code == 200 assert resp.msg == "" assert resp.headers.lst == [[':status', '200'], ['etag', 'foobar']] assert resp.body == b'foobar' @@ -294,12 +295,13 @@ class TestReadEmptyResponse(tservers.ServerTestBase): c.connect() c.convert_to_ssl() protocol = http2.HTTP2Protocol(c) + protocol.connection_preface_performed = True resp = protocol.read_response() assert resp.stream_id assert resp.httpversion == (2, 0) - assert resp.status_code == "200" + assert resp.status_code == 200 assert resp.msg == "" assert resp.headers.lst == [[':status', '200'], ['etag', 'foobar']] assert resp.body == b'' @@ -322,6 +324,7 @@ class TestReadRequest(tservers.ServerTestBase): c.connect() c.convert_to_ssl() protocol = http2.HTTP2Protocol(c, is_server=True) + protocol.connection_preface_performed = True resp = protocol.read_request() -- cgit v1.2.3