diff options
author | Marcelo Glezer <mg@tekii.com.ar> | 2014-12-11 14:54:14 -0300 |
---|---|---|
committer | Marcelo Glezer <mg@tekii.com.ar> | 2014-12-11 14:54:14 -0300 |
commit | 4952643a0d76eb1e9bd51cbbe95c565ae48b97a2 (patch) | |
tree | f43fc647bdfabb522bdef32e21ea4a36404cc311 /test/test_dump.py | |
parent | 83b1d4e0e0490e5be05943da459c925a3ee3ff14 (diff) | |
parent | ffb95a1db742d71d7671f9e9c6db552774bb0ead (diff) | |
download | mitmproxy-4952643a0d76eb1e9bd51cbbe95c565ae48b97a2.tar.gz mitmproxy-4952643a0d76eb1e9bd51cbbe95c565ae48b97a2.tar.bz2 mitmproxy-4952643a0d76eb1e9bd51cbbe95c565ae48b97a2.zip |
Merge remote-tracking branch 'base/master'
Diffstat (limited to 'test/test_dump.py')
-rw-r--r-- | test/test_dump.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/test/test_dump.py b/test/test_dump.py index 2e58e073..e9cb4d33 100644 --- a/test/test_dump.py +++ b/test/test_dump.py @@ -1,10 +1,12 @@ import os from cStringIO import StringIO -from libmproxy import dump, flow, proxy +from libmproxy import dump, flow +from libmproxy.protocol import http from libmproxy.proxy.primitives import Log import tutils import mock + def test_strfuncs(): t = tutils.tresp() t.is_replay = True @@ -58,6 +60,18 @@ class TestDumpMaster: assert m.handle_error(f) assert "error" in cs.getvalue() + def test_missing_content(self): + cs = StringIO() + o = dump.Options(flow_detail=3) + m = dump.DumpMaster(None, o, outfile=cs) + f = tutils.tflow() + f.request.content = http.CONTENT_MISSING + m.handle_request(f) + f.response = tutils.tresp() + f.response.content = http.CONTENT_MISSING + m.handle_response(f) + assert "content missing" in cs.getvalue() + def test_replay(self): cs = StringIO() |