aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_examples.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_examples.py')
-rw-r--r--test/test_examples.py30
1 files changed, 0 insertions, 30 deletions
diff --git a/test/test_examples.py b/test/test_examples.py
deleted file mode 100644
index bb7c596b..00000000
--- a/test/test_examples.py
+++ /dev/null
@@ -1,30 +0,0 @@
-import glob
-from libmproxy import utils, script
-from libmproxy.proxy import config
-from . import tservers
-
-
-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:
- if "har_extractor" in f:
- continue
- if "flowwriter" in f:
- f += " -"
- if "iframe_injector" in f:
- f += " foo" # one argument required
- if "filt" in f:
- f += " ~a"
- if "modify_response_body" in f:
- f += " foo bar" # two arguments required
- try:
- s = script.Script(f, script.ScriptContext(tmaster)) # Loads the script file.
- except Exception as v:
- if "ImportError" not in str(v):
- raise
- else:
- s.unload()