aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/test
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2018-04-04 14:25:37 +1200
committerAldo Cortesi <aldo@corte.si>2018-04-07 09:02:10 +1200
commitea213782d8adaa21aa99f2de818172ee872cf3e9 (patch)
tree8a7b82d3d9dcc0ead3085c274448f0f982aa3003 /mitmproxy/test
parent80f2bac356dd8abc50a28e4c8d9951a60979d168 (diff)
downloadmitmproxy-ea213782d8adaa21aa99f2de818172ee872cf3e9.tar.gz
mitmproxy-ea213782d8adaa21aa99f2de818172ee872cf3e9.tar.bz2
mitmproxy-ea213782d8adaa21aa99f2de818172ee872cf3e9.zip
asyncio: remove test master.has_log
Now that logs are async, using this call is almost always a mistake. Signal this by making it semi-private. The method may go away entirely down the track.
Diffstat (limited to 'mitmproxy/test')
-rw-r--r--mitmproxy/test/taddons.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mitmproxy/test/taddons.py b/mitmproxy/test/taddons.py
index 5cef80f1..6d439c4a 100644
--- a/mitmproxy/test/taddons.py
+++ b/mitmproxy/test/taddons.py
@@ -35,7 +35,7 @@ class RecordingMaster(mitmproxy.master.Master):
for i in self.logs:
print("%s: %s" % (i.level, i.msg), file=outf)
- def has_log(self, txt, level=None):
+ def _has_log(self, txt, level=None):
for i in self.logs:
if level and i.level != level:
continue
@@ -45,7 +45,7 @@ class RecordingMaster(mitmproxy.master.Master):
async def await_log(self, txt, level=None):
for i in range(20):
- if self.has_log(txt, level):
+ if self._has_log(txt, level):
return True
else:
await asyncio.sleep(0.1)