aboutsummaryrefslogtreecommitdiffstats
path: root/test/mitmproxy/addons/test_script.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/mitmproxy/addons/test_script.py')
-rw-r--r--test/mitmproxy/addons/test_script.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/mitmproxy/addons/test_script.py b/test/mitmproxy/addons/test_script.py
index 05472d9a..0279d1d9 100644
--- a/test/mitmproxy/addons/test_script.py
+++ b/test/mitmproxy/addons/test_script.py
@@ -135,6 +135,17 @@ class TestScript:
assert await tctx.master.await_log("ValueError: Error!")
assert await tctx.master.await_log("error.py")
+
+ @pytest.mark.asyncio
+ async def test_optionexceptions(self, tdata):
+ with taddons.context() as tctx:
+ sc = script.Script(
+ tdata.path("mitmproxy/data/addonscripts/configure.py"),
+ True,
+ )
+ tctx.master.addons.add(sc)
+ tctx.configure(sc)
+ assert await tctx.master.await_log("Options Error")
@pytest.mark.asyncio
async def test_addon(self, tdata):