aboutsummaryrefslogtreecommitdiffstats
path: root/test/http/http1/test_protocol.py
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2015-08-21 10:03:57 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2015-08-21 10:04:57 +0200
commitcd9701050f58f90c757a34f7e4e6b5711700d649 (patch)
treea34ce39dc2a260d57873e14e35bfedd1d939c9cb /test/http/http1/test_protocol.py
parent6fc2ff94694d70426663209e2ded977d9e0ecd3c (diff)
downloadmitmproxy-cd9701050f58f90c757a34f7e4e6b5711700d649.tar.gz
mitmproxy-cd9701050f58f90c757a34f7e4e6b5711700d649.tar.bz2
mitmproxy-cd9701050f58f90c757a34f7e4e6b5711700d649.zip
read_response depends on request for stream_id
Diffstat (limited to 'test/http/http1/test_protocol.py')
-rw-r--r--test/http/http1/test_protocol.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/http/http1/test_protocol.py b/test/http/http1/test_protocol.py
index 6704647f..31bf7dab 100644
--- a/test/http/http1/test_protocol.py
+++ b/test/http/http1/test_protocol.py
@@ -376,8 +376,9 @@ class TestReadRequest(object):
class TestReadResponse(object):
def tst(self, data, method, body_size_limit, include_body=True):
data = textwrap.dedent(data)
+ request = http.EmptyRequest(method=method)
return mock_protocol(data).read_response(
- method, body_size_limit, include_body=include_body
+ request, body_size_limit, include_body=include_body
)
def test_errors(self):
@@ -457,7 +458,7 @@ class TestReadResponseNoContentLength(tservers.ServerTestBase):
def test_no_content_length(self):
c = tcp.TCPClient(("127.0.0.1", self.port))
c.connect()
- resp = HTTP1Protocol(c).read_response("GET", None)
+ resp = HTTP1Protocol(c).read_response(http.EmptyRequest(method="GET"), None)
assert resp.body == "bar\r\n\r\n"