aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2014-07-26 11:51:27 +0200
committerMaximilian Hils <git@maximilianhils.com>2014-07-26 11:51:27 +0200
commita73ad1d945c9d3371c1530113a1c4ea3446f3fd4 (patch)
tree2fbbaebd173845ac1bb6aa23d5752f3e888717a2 /test
parent41f49ff0d4932098ddd4eaae715e7ee141ca02e4 (diff)
downloadmitmproxy-a73ad1d945c9d3371c1530113a1c4ea3446f3fd4.tar.gz
mitmproxy-a73ad1d945c9d3371c1530113a1c4ea3446f3fd4.tar.bz2
mitmproxy-a73ad1d945c9d3371c1530113a1c4ea3446f3fd4.zip
fix tests
Diffstat (limited to 'test')
-rw-r--r--test/test_examples.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/test/test_examples.py b/test/test_examples.py
index fa57b7eb..d18b5862 100644
--- a/test/test_examples.py
+++ b/test/test_examples.py
@@ -1,12 +1,17 @@
-from libmproxy import utils, script
import glob
+from libmproxy import utils, script
from libmproxy.proxy import config
import tservers
-example_dir = utils.Data("libmproxy").path("../examples")
-scripts = glob.glob("%s/*.py" % example_dir)
-tmaster = tservers.TestMaster(config.ProxyConfig())
+def test_load_scripts():
+
+ example_dir = utils.Data("libmproxy").path("../examples")
+ scripts = glob.glob("%s/*.py" % example_dir)
+
+ tmaster = tservers.TestMaster(config.ProxyConfig())
-for f in scripts:
- script.Script(f, tmaster) # Loads the script file. \ No newline at end of file
+ for f in scripts:
+ if "modify_response_body" in f:
+ f += " foo bar" # two arguments required
+ script.Script(f, tmaster) # Loads the script file. \ No newline at end of file