    def test_user_lookup_by_name(self):
        '''Tests user lookup on ID.'''
        sb = bot.SecurityBot(None, None, None)
        user = {'id': 'id', 'name': 'user'}
        sb.users_by_name = {user['name']: user}
        assert sb.user_lookup_by_name('user') == user
        try:
            sb.user_lookup_by_name('not-a-real-user')
        except Exception:
            return
        assert False, 'A user should not have been found.'
Tests user lookup on ID.
tests/bot_test.py