diff --git a/mitmproxy/test/taddons.py b/mitmproxy/test/taddons.py index 67c15f753..509f8d530 100644 --- a/mitmproxy/test/taddons.py +++ b/mitmproxy/test/taddons.py @@ -17,10 +17,6 @@ class TestAddons(addonmanager.AddonManager): def trigger(self, event, *args, **kwargs): if event == "log": self.master.logs.append(args[0]) - elif event == "tick" and not args and not kwargs: - pass - else: - self.master.events.append((event, args, kwargs)) super().trigger(event, *args, **kwargs) @@ -28,7 +24,6 @@ class RecordingMaster(mitmproxy.master.Master): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.addons = TestAddons(self) - self.events = [] self.logs = [] def dump_log(self, outf=sys.stdout): @@ -51,12 +46,6 @@ class RecordingMaster(mitmproxy.master.Master): await asyncio.sleep(0.1) return False - def has_event(self, name): - for i in self.events: - if i[0] == name: - return True - return False - def clear(self): self.logs = [] diff --git a/test/mitmproxy/test_taddons.py b/test/mitmproxy/test_taddons.py index 5266e0383..53091bc14 100644 --- a/test/mitmproxy/test_taddons.py +++ b/test/mitmproxy/test_taddons.py @@ -10,7 +10,6 @@ from mitmproxy import ctx async def test_recordingmaster(): with taddons.context() as tctx: assert not tctx.master.has_log("nonexistent") - assert not tctx.master.has_event("nonexistent") ctx.log.error("foo") assert not tctx.master.has_log("foo", level="debug") assert await tctx.master.await_log("foo", level="error")