aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorkira0204 <rshtmudgal@gmail.com>2018-03-26 03:28:28 +0530
committerkira0204 <rshtmudgal@gmail.com>2018-03-26 03:28:28 +0530
commit22b514977761c84dfc9eed1c0c3363f977b273d6 (patch)
tree6d8e40a0df5d902f0f32b42a33969a0519dcbf42 /test
parentb8fbe71c93866cd59a2193d9ecac369b141128fd (diff)
downloadmitmproxy-22b514977761c84dfc9eed1c0c3363f977b273d6.tar.gz
mitmproxy-22b514977761c84dfc9eed1c0c3363f977b273d6.tar.bz2
mitmproxy-22b514977761c84dfc9eed1c0c3363f977b273d6.zip
use error handler function
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/addons/test_script.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/mitmproxy/addons/test_script.py b/test/mitmproxy/addons/test_script.py
index 623ed9a1..79fa22dc 100644
--- a/test/mitmproxy/addons/test_script.py
+++ b/test/mitmproxy/addons/test_script.py
@@ -183,9 +183,9 @@ class TestScriptLoader:
def test_script_run_nonexistent(self):
sc = script.ScriptLoader()
- with taddons.context(sc):
- with pytest.raises(exceptions.CommandError):
- sc.script_run([tflow.tflow(resp=True)], "/")
+ with taddons.context(sc) as tctx:
+ sc.script_run([tflow.tflow(resp=True)], "/")
+ tctx.master.has_log("/: No such script")
def test_simple(self):
sc = script.ScriptLoader()