def log(self, message: str, level: str = "info") -> None: x = log.LogEntry(self.log_prefix + message, level) x.reply = controller.DummyReply() # type: ignore asyncio_utils.create_task( self.master.addons.handle_lifecycle(log.AddLogHook(x)), name="ProxyConnectionHandler.log" )
def test_has_error(self): m = self.mkmaster() ent = log.LogEntry("foo", "error") ent.reply = controller.DummyReply() m.addons.trigger(log.AddLogHook(ent)) assert m.errorcheck.has_errored