From 8cade9fbbf15480fd5b9f7410d65c928dd26f652 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Fri, 25 Feb 2011 21:11:44 +1300 Subject: Move stringification funcs from proxy to dump. --- test/test_dump.py | 10 ++++++++++ test/test_proxy.py | 2 -- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'test') 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): -- cgit v1.2.3