

def ensure_only_specificmessage_from_bot(self, match, wait=5, tosender=False):
    if (tosender is True):
        match = six.text_type('^\\<@{}\\>: {}$').format(self.driver_userid, match)
    else:
        match = '^{}$'.format(match)
    for _ in range(wait):
        time.sleep(1)
        with self._events_lock:
            for event in self.events:
                if (self._is_bot_message(event) and (re.match(match, event['text'], re.DOTALL) is None)):
                    raise AssertionError('expected to get message matching "{}", but got message "{}"'.format(match, match['text']))

dataset/ETHPy150Open lins05/slackbot/tests/functional/driver.py Driver.ensure_only_specificmessage_from_bot/VarMisuse@136/196 `event`->`match`