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.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/test_examples.py b/test/test_examples.py
index fd42e6f0..deb97b49 100644
--- a/test/test_examples.py
+++ b/test/test_examples.py
@@ -1,10 +1,8 @@
import glob
-import mock
from libmproxy import utils, script
from libmproxy.proxy import config
import tservers
-@mock.patch.dict("sys.modules", {"bs4": mock.Mock()})
def test_load_scripts():
example_dir = utils.Data("libmproxy").path("../examples")
scripts = glob.glob("%s/*.py" % example_dir)
@@ -12,8 +10,11 @@ def test_load_scripts():
tmaster = tservers.TestMaster(config.ProxyConfig())
for f in scripts:
+ if "har_extractor" in f:
+ f += " foo"
if "iframe_injector" in f:
f += " foo" # one argument required
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
+ s = script.Script(f, tmaster) # Loads the script file.
+ s.unload() \ No newline at end of file