mitmproxy/test/mitmproxy/tools/test_main.py
2018-04-23 19:16:33 +12:00

24 lines
490 B
Python

import asyncio
from mitmproxy.tools import main
shutdown_script = "mitmproxy/data/addonscripts/shutdown.py"
def test_mitmweb(event_loop, tdata):
asyncio.set_event_loop(event_loop)
main.mitmweb([
"--no-web-open-browser",
"-s", tdata.path(shutdown_script),
"-q", "-p", "0",
])
def test_mitmdump(event_loop, tdata):
asyncio.set_event_loop(event_loop)
main.mitmdump([
"-s", tdata.path(shutdown_script),
"-q", "-p", "0",
])