diff options
author | Rouli <rouli.net@gmail.com> | 2013-02-28 13:28:57 +0200 |
---|---|---|
committer | Rouli <rouli.net@gmail.com> | 2013-02-28 13:28:57 +0200 |
commit | b6cae7cd2d0105d6a6fe9d35864d0f9b7c5f8924 (patch) | |
tree | a939022f9bbafea95d1d2e88e141b6cceefebdd2 /test/test_dump.py | |
parent | 35f36481b9f9a8050e0316600be168316b60d05e (diff) | |
parent | b077189dd5230b6c440a200d867c70c6ce031b66 (diff) | |
download | mitmproxy-b6cae7cd2d0105d6a6fe9d35864d0f9b7c5f8924.tar.gz mitmproxy-b6cae7cd2d0105d6a6fe9d35864d0f9b7c5f8924.tar.bz2 mitmproxy-b6cae7cd2d0105d6a6fe9d35864d0f9b7c5f8924.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'test/test_dump.py')
-rw-r--r-- | test/test_dump.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/test_dump.py b/test/test_dump.py index e1241e29..5d3f9133 100644 --- a/test/test_dump.py +++ b/test/test_dump.py @@ -3,6 +3,7 @@ from cStringIO import StringIO import libpry from libmproxy import dump, flow, proxy import tutils +import mock def test_strfuncs(): t = tutils.tresp() @@ -21,6 +22,7 @@ class TestDumpMaster: req = tutils.treq() req.content = content l = proxy.Log("connect") + l.reply = mock.MagicMock() m.handle_log(l) cc = req.client_conn cc.connection_error = "error" @@ -29,7 +31,9 @@ class TestDumpMaster: m.handle_clientconnect(cc) m.handle_request(req) f = m.handle_response(resp) - m.handle_clientdisconnect(flow.ClientDisconnect(cc)) + cd = flow.ClientDisconnect(cc) + cd.reply = mock.MagicMock() + m.handle_clientdisconnect(cd) return f def _dummy_cycle(self, n, filt, content, **options): |