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!')
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
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)
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)
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)
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)