diff options
| author | 2020-05-23 18:42:03 +0300 | |
|---|---|---|
| committer | 2020-06-11 08:59:43 +0300 | |
| commit | bbe4f137bd583d66a6bcb03102327bc6c586af86 (patch) | |
| tree | 88c9541e459f641b0b5a9fe4438b868312608b69 | |
| parent | Jam Tests: Create test for successful `ctx.send` calling (diff) | |
Jam Tests: Create test for `setup` function
| -rw-r--r-- | tests/bot/cogs/test_jams.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/bot/cogs/test_jams.py b/tests/bot/cogs/test_jams.py index 7db66ff11..2c5cef835 100644 --- a/tests/bot/cogs/test_jams.py +++ b/tests/bot/cogs/test_jams.py @@ -1,7 +1,7 @@ import unittest from unittest.mock import patch -from bot.cogs.jams import CodeJams +from bot.cogs.jams import CodeJams, setup from bot.constants import Roles from tests.helpers import MockBot, MockContext, MockGuild, MockMember, MockRole @@ -126,3 +126,13 @@ class JamCreateTeamTests(unittest.IsolatedAsyncioTestCase): self.ctx.reset_mock() await self.cog.createteam(self.cog, self.ctx, "foo", (MockMember() for _ in range(5))) self.ctx.send.assert_awaited_once() + + +class CodeJamSetup(unittest.TestCase): + """Test for `setup` function of `CodeJam` cog.""" + + def test_setup(self): + """Should call `bot.add_cog`.""" + bot = MockBot() + setup(bot) + bot.add_cog.assert_called_once() |