

def ensure_no_channel_reply_from_bot(self, wait=5):
    for _ in range(wait):
        time.sleep(1)
        with self._events_lock:
            for event in self.events:
                if self._is_bot_message(event):
                    raise AssertionError('expected to get nothing, but got message "{}"'.format(event['text']))

dataset/ETHPy150Open lins05/slackbot/tests/functional/driver.py Driver.ensure_no_channel_reply_from_bot/original