aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-10-08 12:25:41 -0700
committerGravatar MarkKoz <[email protected]>2020-10-08 12:25:41 -0700
commitd0c3990e8eb9e68537c05ec58594abdf5c4cee9e (patch)
treebd88f642fcdc756dac4df54d208459437b6df6d6 /tests
parentSilence tests: fix unawaited coro warnings (diff)
Silence: add to notifier when indefinite rather than temporary
Accidentally swapped the logic in a previous commit during a refactor.
Diffstat (limited to 'tests')
-rw-r--r--tests/bot/cogs/moderation/test_silence.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/bot/cogs/moderation/test_silence.py b/tests/bot/cogs/moderation/test_silence.py
index 6a8db72e8..50d8419ac 100644
--- a/tests/bot/cogs/moderation/test_silence.py
+++ b/tests/bot/cogs/moderation/test_silence.py
@@ -296,17 +296,17 @@ class SilenceTests(unittest.IsolatedAsyncioTestCase):
self.assertDictEqual(prev_overwrite_dict, new_overwrite_dict)
- async def test_temp_added_to_notifier(self):
- """Channel was added to notifier if a duration was set for the silence."""
+ async def test_temp_not_added_to_notifier(self):
+ """Channel was not added to notifier if a duration was set for the silence."""
with mock.patch.object(self.cog, "_silence_overwrites", return_value=True):
await self.cog.silence.callback(self.cog, MockContext(), 15)
- self.cog.notifier.add_channel.assert_called_once()
+ self.cog.notifier.add_channel.assert_not_called()
- async def test_indefinite_not_added_to_notifier(self):
- """Channel was not added to notifier if a duration was not set for the silence."""
+ async def test_indefinite_added_to_notifier(self):
+ """Channel was added to notifier if a duration was not set for the silence."""
with mock.patch.object(self.cog, "_silence_overwrites", return_value=True):
await self.cog.silence.callback(self.cog, MockContext(), None)
- self.cog.notifier.add_channel.assert_not_called()
+ self.cog.notifier.add_channel.assert_called_once()
async def test_silenced_not_added_to_notifier(self):
"""Channel was not added to the notifier if it was already silenced."""