aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ks129 <[email protected]>2020-10-11 13:08:27 +0300
committerGravatar ks129 <[email protected]>2020-10-11 13:08:27 +0300
commitb792af63022bf8e435210c9efefccc664c3bbf80 (patch)
treead363c1eda34076e54ba8265df9d48744f19e227
parentCreate test for permanent voice ban (diff)
Create test for temporary voice ban
-rw-r--r--tests/bot/exts/moderation/infraction/test_infractions.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/bot/exts/moderation/infraction/test_infractions.py b/tests/bot/exts/moderation/infraction/test_infractions.py
index 27f346648..814959775 100644
--- a/tests/bot/exts/moderation/infraction/test_infractions.py
+++ b/tests/bot/exts/moderation/infraction/test_infractions.py
@@ -66,7 +66,13 @@ class VoiceBanTests(unittest.IsolatedAsyncioTestCase):
self.cog = Infractions(self.bot)
async def test_permanent_voice_ban(self):
- """Should call voice ban applying function."""
+ """Should call voice ban applying function without expiry."""
self.cog.apply_voice_ban = AsyncMock()
self.assertIsNone(await self.cog.voice_ban(self.cog, self.ctx, self.user, reason="foobar"))
self.cog.apply_voice_ban.assert_awaited_once_with(self.ctx, self.user, "foobar")
+
+ async def test_temporary_voice_ban(self):
+ """Should call voice ban applying function with expiry."""
+ self.cog.apply_voice_ban = AsyncMock()
+ self.assertIsNone(await self.cog.tempvoiceban(self.cog, self.ctx, self.user, "baz", reason="foobar"))
+ self.cog.apply_voice_ban.assert_awaited_once_with(self.ctx, self.user, "foobar", expires_at="baz")