diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2011-02-19 17:00:24 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2011-02-19 17:00:24 +1300 |
commit | 5da27a9905302a5e43fdf4db8a7b7b784544bed2 (patch) | |
tree | 83b5890142d37b65b655a8d60a3082313fa0cdd3 /test/test_proxy.py | |
parent | cd4eea39348fc9d59d4f0cc3f71384f7c1c2b2e2 (diff) | |
download | mitmproxy-5da27a9905302a5e43fdf4db8a7b7b784544bed2.tar.gz mitmproxy-5da27a9905302a5e43fdf4db8a7b7b784544bed2.tar.bz2 mitmproxy-5da27a9905302a5e43fdf4db8a7b7b784544bed2.zip |
Refactor Flow primitives to remove HTTP1.0 assumption.
This is a big patch removing the assumption that there's one connection per
Request/Response pair. It touches pretty much every part of mitmproxy, so
expect glitches until everything is ironed out.
Diffstat (limited to 'test/test_proxy.py')
-rw-r--r-- | test/test_proxy.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/test_proxy.py b/test/test_proxy.py index 7bb608ae..ba9d9bfa 100644 --- a/test/test_proxy.py +++ b/test/test_proxy.py @@ -213,7 +213,7 @@ class uRequest(libpry.AutoTree): def test_simple(self): h = utils.Headers() h["test"] = ["test"] - c = proxy.ClientConnection(("addr", 2222)) + c = proxy.ClientConnect(("addr", 2222)) r = proxy.Request(c, "host", 22, "https", "GET", "/", h, "content") u = r.url() assert r.set_url(u) @@ -225,17 +225,17 @@ class uRequest(libpry.AutoTree): def test_getset_state(self): h = utils.Headers() h["test"] = ["test"] - c = proxy.ClientConnection(("addr", 2222)) + c = proxy.ClientConnect(("addr", 2222)) r = proxy.Request(c, "host", 22, "https", "GET", "/", h, "content") state = r.get_state() - assert proxy.Request.from_state(c, state) == r + assert proxy.Request.from_state(state) == r class uResponse(libpry.AutoTree): def test_simple(self): h = utils.Headers() h["test"] = ["test"] - c = proxy.ClientConnection(("addr", 2222)) + c = proxy.ClientConnect(("addr", 2222)) req = proxy.Request(c, "host", 22, "https", "GET", "/", h, "content") resp = proxy.Response(req, 200, "msg", h.copy(), "content") assert resp.short() @@ -244,7 +244,7 @@ class uResponse(libpry.AutoTree): def test_getset_state(self): h = utils.Headers() h["test"] = ["test"] - c = proxy.ClientConnection(("addr", 2222)) + c = proxy.ClientConnect(("addr", 2222)) r = proxy.Request(c, "host", 22, "https", "GET", "/", h, "content") req = proxy.Request(c, "host", 22, "https", "GET", "/", h, "content") resp = proxy.Response(req, 200, "msg", h.copy(), "content") |