aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2011-02-02 10:08:24 +1300
committerAldo Cortesi <aldo@nullcube.com>2011-02-02 10:09:16 +1300
commit405e60215ce135ef7e94803d25c34404d742a06e (patch)
tree8394d61cf77da8ed89dcff240055f32d2e562b3e /test
parentb886f808beaba097066a1b82fe560b1e70099df0 (diff)
downloadmitmproxy-405e60215ce135ef7e94803d25c34404d742a06e.tar.gz
mitmproxy-405e60215ce135ef7e94803d25c34404d742a06e.tar.bz2
mitmproxy-405e60215ce135ef7e94803d25c34404d742a06e.zip
View script debug output (stderr) in pager.
Diffstat (limited to 'test')
-rwxr-xr-xtest/scripts/a1
-rw-r--r--test/test_flow.py3
2 files changed, 3 insertions, 1 deletions
diff --git a/test/scripts/a b/test/scripts/a
index 6973a44f..fb4a7b82 100755
--- a/test/scripts/a
+++ b/test/scripts/a
@@ -5,4 +5,5 @@ from libmproxy import script
f = script.load_flow()
f.request.host = "TESTOK"
+print >> sys.stderr, "DEBUG"
script.return_flow(f)
diff --git a/test/test_flow.py b/test/test_flow.py
index c97cc030..3ff106d8 100644
--- a/test/test_flow.py
+++ b/test/test_flow.py
@@ -7,7 +7,8 @@ class uFlow(libpry.AutoTree):
f = utils.tflow()
f.response = utils.tresp()
f.request = f.response.request
- f = f.run_script("scripts/a")
+ f, se = f.run_script("scripts/a")
+ assert "DEBUG" == se.strip()
assert f.request.host == "TESTOK"
def test_run_script_err(self):