aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-09-26 14:25:39 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-09-26 14:25:39 +1200
commit10a19fc4da5a6fbbfd4a36d0e61d3bc80a38e937 (patch)
treead4d4e2f4fa8769d61ea06fbfc3881870eeb737b /test
parent424d15c28ba46d2d42b96d2247166eb13b4c7b8e (diff)
downloadmitmproxy-10a19fc4da5a6fbbfd4a36d0e61d3bc80a38e937.tar.gz
mitmproxy-10a19fc4da5a6fbbfd4a36d0e61d3bc80a38e937.tar.bz2
mitmproxy-10a19fc4da5a6fbbfd4a36d0e61d3bc80a38e937.zip
Refactor print_requests -> print_request
- Change to handle one request at a time - Shift error handling around
Diffstat (limited to 'test')
-rw-r--r--test/test_pathoc.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/test/test_pathoc.py b/test/test_pathoc.py
index ce1476a6..0a37c4b7 100644
--- a/test/test_pathoc.py
+++ b/test/test_pathoc.py
@@ -30,14 +30,15 @@ class TestDaemon:
if timeout:
c.settimeout(timeout)
s = cStringIO.StringIO()
- c.print_requests(
- requests,
- showreq = showreq,
- showresp = showresp,
- explain = explain,
- hexdump = hexdump,
- fp = s
- )
+ for i in requests:
+ c.print_request(
+ i,
+ showreq = showreq,
+ showresp = showresp,
+ explain = explain,
+ hexdump = hexdump,
+ fp = s
+ )
return s.getvalue()
def test_timeout(self):