From 38ff8109fb814d96c271e27caa65b0c98a169ee2 Mon Sep 17 00:00:00 2001
From: Aldo Cortesi <aldo@corte.si>
Date: Wed, 2 May 2018 11:31:28 +1200
Subject: taddons: remove has_event

We no longer use this anywhere, so ditch it.
---
 mitmproxy/test/taddons.py      | 11 -----------
 test/mitmproxy/test_taddons.py |  1 -
 2 files changed, 12 deletions(-)

diff --git a/mitmproxy/test/taddons.py b/mitmproxy/test/taddons.py
index 67c15f75..509f8d53 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 5266e038..53091bc1 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")
-- 
cgit v1.2.3