MCPcopy Index your code
hub / github.com/mitmproxy/mitmproxy / test_addon

Method test_addon

test/mitmproxy/addons/test_script.py:144–156  ·  view source on GitHub ↗
(self, tdata, caplog_async)

Source from the content-addressed store, hash-verified

142 assert "Options Error" in caplog.text
143
144 async def test_addon(self, tdata, caplog_async):
145 caplog_async.set_level("INFO")
146 with taddons.context() as tctx:
147 sc = script.Script(tdata.path("mitmproxy/data/addonscripts/addon.py"), True)
148 tctx.master.addons.add(sc)
149 await caplog_async.await_log("addon running")
150 assert sc.ns.event_log == [
151 "scriptload",
152 "addonload",
153 "scriptconfigure",
154 "addonconfigure",
155 ]
156 sc.done()
157
158
159class TestCutTraceback:

Callers

nothing calls this directly

Calls 6

doneMethod · 0.95
set_levelMethod · 0.80
contextMethod · 0.80
await_logMethod · 0.80
pathMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected