from tests.utils import bot, OWNER, SENDER def test_private_message(bot): bot.test_private_message(bot.channel, SENDER, "hello") assert len(bot.answers) == 0 def test_private_command(bot): bot.test_private_message(bot.channel, SENDER, "!hello") assert len(bot.answers) == 1 assert bot.answers[0].message == "Vos commandes dans le salon public" def test_public_message(bot): # Cheating here to save message sent bot.review.started = True bot.test_public_message(bot.channel, SENDER, " hello ") assert len(bot.answers) == 0 assert bot.review.messages[0].text == "hello"