aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_examples.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-02-15 14:58:46 +0100
committerMaximilian Hils <git@maximilianhils.com>2016-02-15 14:58:46 +0100
commit33fa49277a821b9d38e8c9bf0bcf2adcfa2f6f04 (patch)
tree31914a601302579ff817504019296fd7e9e46765 /test/test_examples.py
parent36f34f701991b5d474c005ec45e3b66e20f326a8 (diff)
downloadmitmproxy-33fa49277a821b9d38e8c9bf0bcf2adcfa2f6f04.tar.gz
mitmproxy-33fa49277a821b9d38e8c9bf0bcf2adcfa2f6f04.tar.bz2
mitmproxy-33fa49277a821b9d38e8c9bf0bcf2adcfa2f6f04.zip
move mitmproxy
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()