diff --git a/tests/test_cog.py b/tests/test_cog.py index b754917..7dd4870 100644 --- a/tests/test_cog.py +++ b/tests/test_cog.py @@ -2,11 +2,14 @@ import copy import pytest +import discord import discord.ext.test as dpytest from data import auteurs_example_data +## NOTE: to debug: print(dpytest.get_messages().content) + @pytest.mark.asyncio async def test_adduser_command(config_bot): # if the API Manager is not rightly mocked this test should fail, on purpose! @@ -29,6 +32,18 @@ async def test_getuser_command(config_bot): assert dpytest.verify().message().contains().content("Points: 3040") +@pytest.mark.asyncio +async def test_help_command(config_bot): + ### + # comments are the same than for test_adduser_command you should check it out + ### + await dpytest.message("!help") + + embedded_help_words = ["adduser", "addusers", "getuser", "help", "status"] + for word in embedded_help_words: + assert dpytest.verify().message().peek().contains().content(word) + + @pytest.mark.asyncio async def test_getuser_not_found(config_bot): ###