diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2013-02-17 12:42:48 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2013-02-17 12:42:48 +1300 |
commit | aaf892e3afc682b2dc2a166a96872420e50092cd (patch) | |
tree | 5de224011071aab6f8fb026e7ac56685b80c1f7a /test/test_dump.py | |
parent | 1ccb2c5dea9530682aae83d489f1738d9286fa4e (diff) | |
download | mitmproxy-aaf892e3afc682b2dc2a166a96872420e50092cd.tar.gz mitmproxy-aaf892e3afc682b2dc2a166a96872420e50092cd.tar.bz2 mitmproxy-aaf892e3afc682b2dc2a166a96872420e50092cd.zip |
Significantly refactor the master/slave message passing interface.
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): |