aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_dump.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-04-03 09:52:26 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-04-03 09:52:26 +1200
commitf526e5fa125339e8f3a16c1590c1607f45862b47 (patch)
tree041f77932eb145775d69369869d0a8e012415b1c /test/test_dump.py
parent4979a22d3e1e62786394b0038842ff9e20554619 (diff)
downloadmitmproxy-f526e5fa125339e8f3a16c1590c1607f45862b47.tar.gz
mitmproxy-f526e5fa125339e8f3a16c1590c1607f45862b47.tar.bz2
mitmproxy-f526e5fa125339e8f3a16c1590c1607f45862b47.zip
Minor unit test bump.
Diffstat (limited to 'test/test_dump.py')
-rw-r--r--test/test_dump.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/test_dump.py b/test/test_dump.py
index e7874841..b2b5d8cd 100644
--- a/test/test_dump.py
+++ b/test/test_dump.py
@@ -27,8 +27,9 @@ class uDumpMaster(libpry.AutoTree):
resp.content = content
m.handle_clientconnect(cc)
m.handle_request(req)
- m.handle_response(resp)
+ f = m.handle_response(resp)
m.handle_clientdisconnect(flow.ClientDisconnect(cc))
+ return f
def _dummy_cycle(self, n, filt, content, **options):
cs = StringIO()
@@ -93,6 +94,12 @@ class uDumpMaster(libpry.AutoTree):
def test_filter(self):
assert not "GET" in self._dummy_cycle(1, "~u foo", "", verbosity=1)
+ def test_replacements(self):
+ o = dump.Options(replacements=[(".*", "content", "foo")])
+ m = dump.DumpMaster(None, o, None)
+ f = self._cycle(m, "content")
+ assert f.request.content == "foo"
+
def test_basic(self):
for i in (1, 2, 3):
assert "GET" in self._dummy_cycle(1, "~s", "", verbosity=i, eventlog=True)