aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helpers.py (unfollow)
Commit message (Collapse)AuthorLines
2019-10-14Make test_token_remover use our discord MocksGravatar Sebastiaan Zeeff-0/+1
This commit replaces the standard MagicMocks by our specialized mocks for discord.py objects. It also adds the missing `channel` attribute to the `tests.helpers.MockMessage` mock and moves the file to the correct folder.
2019-10-14Use `MockBot`.Gravatar Johannes Christ-3/+3
2019-10-14Move the `token_remover` cog tests to `unittest`.Gravatar Johannes Christ-0/+139
2019-10-14Add more specialized Mocks to tests.helpersGravatar Sebastiaan Zeeff-181/+383
This commit introduces some new Mock-types to the already existing Mock-types for discord.py objects. The total list is now: - MockGuild - MockRole - MockMember - MockBot - MockContext - MockTextChannel - MockMessage In addition, I've added all coroutines in the documentation for these discord.py objects as `AsyncMock` attributes to ease testing. Tests ensure that the attributes set for the Mocks exist for the actual discord.py objects as well.