aboutsummaryrefslogtreecommitdiffstats
path: root/test/http
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2015-08-21 09:18:14 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2015-08-21 09:18:14 +0200
commit6fc2ff94694d70426663209e2ded977d9e0ecd3c (patch)
tree9cc6f7d08ec768acb1ecd979617bdb15a8cb94ba /test/http
parent00ed982ea0c802f980732f846955264935d65689 (diff)
downloadmitmproxy-6fc2ff94694d70426663209e2ded977d9e0ecd3c.tar.gz
mitmproxy-6fc2ff94694d70426663209e2ded977d9e0ecd3c.tar.bz2
mitmproxy-6fc2ff94694d70426663209e2ded977d9e0ecd3c.zip
http2: fix tests
Diffstat (limited to 'test/http')
-rw-r--r--test/http/http2/test_protocol.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/http/http2/test_protocol.py b/test/http/http2/test_protocol.py
index fb1f460e..726d8e2e 100644
--- a/test/http/http2/test_protocol.py
+++ b/test/http/http2/test_protocol.py
@@ -127,7 +127,7 @@ class TestPerformServerConnectionPreface(tservers.ServerTestBase):
protocol.perform_server_connection_preface()
assert protocol.connection_preface_performed
- tutils.raises(tcp.NetLibIncomplete, protocol.perform_server_connection_preface, force=True)
+ tutils.raises(tcp.NetLibDisconnect, protocol.perform_server_connection_preface, force=True)
class TestPerformClientConnectionPreface(tservers.ServerTestBase):
@@ -194,12 +194,12 @@ class TestServerStreamIds():
class TestApplySettings(tservers.ServerTestBase):
class handler(tcp.BaseHandler):
-
def handle(self):
# check settings acknowledgement
assert self.rfile.read(9) == '000000040100000000'.decode('hex')
self.wfile.write("OK")
self.wfile.flush()
+ self.rfile.safe_read(9) # just to keep the connection alive a bit longer
ssl = True
@@ -295,6 +295,7 @@ class TestReadRequest(tservers.ServerTestBase):
self.wfile.write(
b'000006000100000001666f6f626172'.decode('hex'))
self.wfile.flush()
+ self.rfile.safe_read(9) # just to keep the connection alive a bit longer
ssl = True
@@ -385,13 +386,13 @@ class TestReadRequestConnect(tservers.ServerTestBase):
class TestReadResponse(tservers.ServerTestBase):
class handler(tcp.BaseHandler):
-
def handle(self):
self.wfile.write(
b'00000801040000000188628594e78c767f'.decode('hex'))
self.wfile.write(
b'000006000100000001666f6f626172'.decode('hex'))
self.wfile.flush()
+ self.rfile.safe_read(9) # just to keep the connection alive a bit longer
ssl = True