mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
tests++ (#1976)
This commit is contained in:
parent
4b10212caf
commit
7b2a986cea
@ -231,7 +231,15 @@ class TestScriptLoader:
|
|||||||
o = options.Options(scripts=["one", "one"])
|
o = options.Options(scripts=["one", "one"])
|
||||||
m = master.Master(o, proxy.DummyServer())
|
m = master.Master(o, proxy.DummyServer())
|
||||||
sc = script.ScriptLoader()
|
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):
|
def test_order(self):
|
||||||
rec = tutils.test_data.path("mitmproxy/data/addonscripts/recorder.py")
|
rec = tutils.test_data.path("mitmproxy/data/addonscripts/recorder.py")
|
||||||
|
Loading…
Reference in New Issue
Block a user