mitmproxy/test/test_examples.py
2014-05-15 18:16:42 +02:00

12 lines
330 B
Python

from libmproxy import utils, script
import glob
from libmproxy.proxy import config
import tservers
example_dir = utils.Data("libmproxy").path("../examples")
scripts = glob.glob("%s/*.py" % example_dir)
tmaster = tservers.TestMaster(config.ProxyConfig())
for f in scripts:
script.Script(f, tmaster) # Loads the script file.