diff options
| author | Aldo Cortesi <aldo@nullcube.com> | 2011-02-25 21:11:44 +1300 |
|---|---|---|
| committer | Aldo Cortesi <aldo@nullcube.com> | 2011-02-25 21:11:44 +1300 |
| commit | 8cade9fbbf15480fd5b9f7410d65c928dd26f652 (patch) | |
| tree | fce913f5bf003f8132d23a0a460bb8f48a4db8dc /test | |
| parent | 3792b0084ea25e49a1a20783b6ce387fc04fc6a8 (diff) | |
| download | mitmproxy-8cade9fbbf15480fd5b9f7410d65c928dd26f652.tar.gz mitmproxy-8cade9fbbf15480fd5b9f7410d65c928dd26f652.tar.bz2 mitmproxy-8cade9fbbf15480fd5b9f7410d65c928dd26f652.zip | |
Move stringification funcs from proxy to dump.
Diffstat (limited to 'test')
| -rw-r--r-- | test/test_dump.py | 10 | ||||
| -rw-r--r-- | test/test_proxy.py | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/test/test_dump.py b/test/test_dump.py index 6213f870..1f6b7acc 100644 --- a/test/test_dump.py +++ b/test/test_dump.py @@ -4,6 +4,12 @@ import libpry from libmproxy import dump, flow import utils +class uStrFuncs(libpry.AutoTree): + def test_all(self): + t = utils.tresp() + t.set_replay() + dump.str_response(t) + class uDumpMaster(libpry.AutoTree): def _cycle(self, m, content): @@ -103,11 +109,15 @@ class uDumpMaster(libpry.AutoTree): self._dummy_cycle, None, "", response_script="scripts/err_return" ) + def test_stickycookie(self): + ret = self._dummy_cycle(None, "", stickycookie = ".*") + tests = [ + uStrFuncs(), uDumpMaster() ] diff --git a/test/test_proxy.py b/test/test_proxy.py index 0c05aeb2..8a59cf0b 100644 --- a/test/test_proxy.py +++ b/test/test_proxy.py @@ -218,7 +218,6 @@ class uRequest(libpry.AutoTree): assert r.set_url(u) assert not r.set_url("") assert r.url() == u - assert r.short() assert r.assemble() def test_getset_state(self): @@ -246,7 +245,6 @@ class uResponse(libpry.AutoTree): 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() assert resp.assemble() def test_getset_state(self): |
