2024-04-01 19:27:52 +02:00
|
|
|
from tests.utils import bot, OWNER, SENDER
|
2024-01-11 08:17:25 +01:00
|
|
|
|
|
|
|
|
|
|
|
def test_private_message(bot):
|
2024-04-01 19:27:52 +02:00
|
|
|
bot.test_private_message(bot.channel, SENDER, "hello")
|
2024-01-11 08:17:25 +01:00
|
|
|
assert len(bot.answers) == 0
|
|
|
|
|
|
|
|
|
|
|
|
def test_private_command(bot):
|
2024-04-01 19:27:52 +02:00
|
|
|
bot.test_private_message(bot.channel, SENDER, "!hello")
|
2024-01-11 08:17:25 +01:00
|
|
|
assert len(bot.answers) == 1
|
2024-04-01 19:27:52 +02:00
|
|
|
assert bot.answers[0].message == "Vos commandes dans le salon public"
|
2024-10-12 11:23:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
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"
|