diff options
| -rw-r--r-- | tests/bot/exts/moderation/infraction/test_infractions.py | 8 | 
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") | 
