aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-08-17 19:54:04 -0700
committerGravatar MarkKoz <[email protected]>2020-08-17 19:54:04 -0700
commite4548b2505cf4765cfd2a2c1a1762212cc5cba25 (patch)
tree4951cf0782052c9e56fea0c3adc2c824a361f3a8
parentSilence tests: add a test for default overwrites on cache miss (diff)
Silence tests: add a test for a mod alert on cache miss
-rw-r--r--tests/bot/cogs/moderation/test_silence.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/bot/cogs/moderation/test_silence.py b/tests/bot/cogs/moderation/test_silence.py
index 992906a50..ccc908ee4 100644
--- a/tests/bot/cogs/moderation/test_silence.py
+++ b/tests/bot/cogs/moderation/test_silence.py
@@ -324,6 +324,13 @@ class UnsilenceTests(unittest.IsolatedAsyncioTestCase):
self.assertIsNone(self.overwrite.send_messages)
self.assertIsNone(self.overwrite.add_reactions)
+ async def test_cache_miss_sent_mod_alert(self):
+ """A message was sent to the mod alerts channel."""
+ self.cog.muted_channel_perms.get.return_value = None
+
+ await self.cog._unsilence(self.channel)
+ self.cog._mod_alerts_channel.send.assert_awaited_once()
+
async def test_removed_notifier(self):
"""Channel was removed from `notifier`."""
await self.cog._unsilence(self.channel)