diff options
author | Maximilian Hils <git@maximilianhils.com> | 2017-02-01 17:52:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-01 17:52:01 +0100 |
commit | 7b2a986ceab45788c42424d2bc9f4b2380ccc832 (patch) | |
tree | cd7515d2c6134061d49155f553d896ea854fc60e /test | |
parent | 4b10212cafb526bdfbbc7c1e26cb5cbd505a0a8e (diff) | |
download | mitmproxy-7b2a986ceab45788c42424d2bc9f4b2380ccc832.tar.gz mitmproxy-7b2a986ceab45788c42424d2bc9f4b2380ccc832.tar.bz2 mitmproxy-7b2a986ceab45788c42424d2bc9f4b2380ccc832.zip |
tests++ (#1976)
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/addons/test_script.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/mitmproxy/addons/test_script.py b/test/mitmproxy/addons/test_script.py index 6e04d49d..f578867d 100644 --- a/test/mitmproxy/addons/test_script.py +++ b/test/mitmproxy/addons/test_script.py @@ -231,7 +231,15 @@ class TestScriptLoader: o = options.Options(scripts=["one", "one"]) m = master.Master(o, proxy.DummyServer()) sc = script.ScriptLoader() - tutils.raises(exceptions.OptionsError, m.addons.add, o, sc) + with tutils.raises(exceptions.OptionsError): + m.addons.add(o, sc) + + def test_nonexistent(self): + o = options.Options(scripts=["nonexistent"]) + m = master.Master(o, proxy.DummyServer()) + sc = script.ScriptLoader() + with tutils.raises(exceptions.OptionsError): + m.addons.add(o, sc) def test_order(self): rec = tutils.test_data.path("mitmproxy/data/addonscripts/recorder.py") |