diff options
| author | 2020-03-08 19:42:18 +0100 | |
|---|---|---|
| committer | 2020-03-08 19:42:18 +0100 | |
| commit | e872176b452ceca1b639ef42d640e18656c7c0c9 (patch) | |
| tree | c8e0b406de413a7f97fd356ec59b7a5f69226dd3 /tests | |
| parent | Add tests for FirstHash class. (diff) | |
Add test case for Silence cog.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/bot/cogs/moderation/test_silence.py | 11 | 
1 files changed, 10 insertions, 1 deletions
| diff --git a/tests/bot/cogs/moderation/test_silence.py b/tests/bot/cogs/moderation/test_silence.py index 2a06f5944..1db2b6eec 100644 --- a/tests/bot/cogs/moderation/test_silence.py +++ b/tests/bot/cogs/moderation/test_silence.py @@ -1,6 +1,7 @@  import unittest -from bot.cogs.moderation.silence import FirstHash +from bot.cogs.moderation.silence import FirstHash, Silence +from tests.helpers import MockBot, MockContext  class FirstHashTests(unittest.TestCase): @@ -23,3 +24,11 @@ class FirstHashTests(unittest.TestCase):          for tuple1, tuple2 in self.test_cases:              with self.subTest(tuple1=tuple1, tuple2=tuple2):                  self.assertTrue(tuple1 == tuple2) + + +class SilenceTests(unittest.TestCase): +    def setUp(self) -> None: + +        self.bot = MockBot() +        self.cog = Silence(self.bot) +        self.ctx = MockContext() | 
