コード例 #1
0
def test_bot_reply_to_message_multiple_decorators(driver):  # noqa: F811
    driver.send_channel_message('hello_decorators')
    driver.wait_for_bot_channel_message('hello!', tosender=False)
    driver.send_channel_message('hello_decorators', tobot=False)
    driver.wait_for_bot_channel_message('hello!', tosender=False)
    driver.send_direct_message('hello_decorators')
    driver.wait_for_bot_direct_message('hello!')
コード例 #2
0
def test_allowed_users(driver):
    driver.send_channel_message('allowed_driver', tobot=True)
    driver.wait_for_bot_channel_message('Driver allowed!', tosender=True)
    driver.send_channel_message('not_allowed_driver', tobot=True)
    try:
        driver.wait_for_bot_channel_message('Driver not allowed!',
                                            tosender=True)
        raise AssertionError('response "Hello not allowed!" was not expected.')
    except AssertionError:
        pass
コード例 #3
0
def test_bot_reply_to_channel_message(driver):  # noqa: F811
    driver.send_channel_message('hello')
    driver.wait_for_bot_channel_message('hello sender!')
    driver.send_channel_message('hello', colon=False)
    driver.wait_for_bot_channel_message('hello sender!')
    driver.send_channel_message('hello', space=False)
    driver.wait_for_bot_channel_message('hello sender!')
    driver.send_channel_message('hello', colon=False, space=False)
    driver.wait_for_bot_channel_message('hello channel!', tosender=False)
コード例 #4
0
def test_bot_reply_to_message_thread(driver):  # noqa: F811
    driver.send_channel_message('hello_reply_threaded', tobot=False)
    driver.wait_for_bot_channel_message('hello threaded!', thread=True)
コード例 #5
0
def test_bot_listen_to_channel_message(driver):  # noqa: F811
    driver.send_channel_message('hello', tobot=False)
    driver.wait_for_bot_channel_message('hello channel!', tosender=False)
コード例 #6
0
def test_allowed_users_by_email(driver):
    driver.send_channel_message('allowed_driver_by_email', tobot=True)
    driver.wait_for_bot_channel_message('Driver email allowed!', tosender=True)