aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_dump.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_dump.py')
-rw-r--r--test/test_dump.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/test_dump.py b/test/test_dump.py
new file mode 100644
index 00000000..da9de2b4
--- /dev/null
+++ b/test/test_dump.py
@@ -0,0 +1,30 @@
+from cStringIO import StringIO
+import libpry
+from libmproxy import dump
+import utils
+
+
+
+class uDumpMaster(libpry.AutoTree):
+ def _dummy_cycle(self, m):
+ req = utils.treq()
+ cc = req.client_conn
+ resp = utils.tresp(req)
+ m.handle_clientconnection(cc)
+ m.handle_request(req)
+ m.handle_response(resp)
+
+ def test_basic_verbosities(self):
+ for i in (1, 2, 3):
+ cs = StringIO()
+ m = dump.DumpMaster(None, i, cs)
+ self._dummy_cycle(m)
+ assert "GET" in cs.getvalue()
+
+
+
+tests = [
+ uDumpMaster()
+]
+
+