aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_flow.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-06-10 13:27:43 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-06-10 13:27:43 +1200
commit6ba5f0f35bcd37dbd15e0f7f78da183a802f6193 (patch)
tree03df678908ed62493520a7bf7b0800bd19574bf2 /test/test_flow.py
parent52779d9db98dff042a0b2b5dca97440b520367df (diff)
downloadmitmproxy-6ba5f0f35bcd37dbd15e0f7f78da183a802f6193.tar.gz
mitmproxy-6ba5f0f35bcd37dbd15e0f7f78da183a802f6193.tar.bz2
mitmproxy-6ba5f0f35bcd37dbd15e0f7f78da183a802f6193.zip
Add HTTP version to response objects.
Another change in the serialization format.
Diffstat (limited to 'test/test_flow.py')
-rw-r--r--test/test_flow.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test_flow.py b/test/test_flow.py
index fd26b095..d220381d 100644
--- a/test/test_flow.py
+++ b/test/test_flow.py
@@ -826,7 +826,7 @@ class TestResponse:
h["test"] = ["test"]
c = flow.ClientConnect(("addr", 2222))
req = flow.Request(c, (1, 1), "host", 22, "https", "GET", "/", h, "content")
- resp = flow.Response(req, 200, "msg", h.copy(), "content", None)
+ resp = flow.Response(req, (1, 1), 200, "msg", h.copy(), "content", None)
assert resp._assemble()
resp2 = resp.copy()
@@ -871,7 +871,7 @@ class TestResponse:
def test_get_cert(self):
req = tutils.treq()
resp = flow.Response(
- req, 200, "msg", flow.ODictCaseless(), "content",
+ req, (1, 1), 200, "msg", flow.ODictCaseless(), "content",
file(tutils.test_data.path("data/dercert")).read()
)
assert resp.get_cert()
@@ -884,12 +884,12 @@ class TestResponse:
h["test"] = ["test"]
c = flow.ClientConnect(("addr", 2222))
req = flow.Request(c, (1, 1), "host", 22, "https", "GET", "/", h, "content")
- resp = flow.Response(req, 200, "msg", h.copy(), "content", None)
+ resp = flow.Response(req, (1, 1), 200, "msg", h.copy(), "content", None)
state = resp._get_state()
assert flow.Response._from_state(req, state) == resp
- resp2 = flow.Response(req, 220, "foo", h.copy(), "test", None)
+ resp2 = flow.Response(req, (1, 1), 220, "foo", h.copy(), "test", None)
assert not resp == resp2
resp._load_state(resp2._get_state())
assert resp == resp2