(self, tdata, caplog_async)
| 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 | |
| 159 | class TestCutTraceback: |