mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 15:37:45 +00:00
fix tests
This commit is contained in:
parent
a699bdc286
commit
667fe0c20b
1
setup.py
1
setup.py
@ -84,6 +84,7 @@ setup(
|
||||
'examples': [
|
||||
"pytz",
|
||||
"harparser",
|
||||
"beautifulsoup4"
|
||||
]
|
||||
}
|
||||
)
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user