diff options
| author | 2020-03-03 16:32:13 +0200 | |
|---|---|---|
| committer | 2020-03-03 16:32:13 +0200 | |
| commit | 154969022cf62bd4a2bab2f7492ded08bb26ffba (patch) | |
| tree | 9e8f892dc520686e6a657cdd9c380af9ac1e07c5 /tests | |
| parent | Created file for moderation utils tests + added setUp to this. (diff) | |
(Moderation Utils Tests): Added imports, modified tests class instance and created new params for tests class
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/bot/cogs/moderation/test_utils.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/bot/cogs/moderation/test_utils.py b/tests/bot/cogs/moderation/test_utils.py index ed1d1ed59..7d47715d4 100644 --- a/tests/bot/cogs/moderation/test_utils.py +++ b/tests/bot/cogs/moderation/test_utils.py @@ -1,12 +1,14 @@ import unittest +from unittest.mock import AsyncMock +from tests.helpers import MockBot, MockContext, MockMember -from tests.helpers import MockBot, MockContext - -class ModerationUtilsTests(unittest.TestCase): +class ModerationUtilsTests(unittest.IsolatedAsyncioTestCase): """Tests Moderation utils.""" - def setUp(self) -> None: + def setUp(self): self.bot = MockBot() - self.ctx = MockContext(bot=self.bot) + self.member = MockMember(id=1234) + self.ctx = MockContext(bot=self.bot, author=self.member) + self.bot.api_client.get = AsyncMock() |