fix tests

This commit is contained in:
Maximilian Hils 2014-11-15 23:10:25 +01:00
parent a699bdc286
commit 667fe0c20b
2 changed files with 3 additions and 2 deletions

View File

@ -84,6 +84,7 @@ setup(
'examples': [
"pytz",
"harparser",
"beautifulsoup4"
]
}
)

View File

@ -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,6 +10,8 @@ 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: