aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-08-17 19:26:48 -0700
committerGravatar MarkKoz <[email protected]>2020-08-17 19:28:41 -0700
commitd4fbd675d9803cc664909c19fcec8a430524f918 (patch)
tree5b38a380f21421a8255a6972e5f50d315585784a
parentSilence tests: add tests for scheduling tasks (diff)
Silence tests: add a test for deletion from the time cache
-rw-r--r--tests/bot/cogs/moderation/test_silence.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/bot/cogs/moderation/test_silence.py b/tests/bot/cogs/moderation/test_silence.py
index 979b4f4e5..6f913b8f9 100644
--- a/tests/bot/cogs/moderation/test_silence.py
+++ b/tests/bot/cogs/moderation/test_silence.py
@@ -319,6 +319,11 @@ class UnsilenceTests(unittest.IsolatedAsyncioTestCase):
await self.cog._unsilence(self.channel)
self.cog.muted_channel_perms.delete.assert_awaited_once_with(self.channel.id)
+ async def test_deleted_cached_time(self):
+ """Channel was deleted from the timestamp cache."""
+ await self.cog._unsilence(self.channel)
+ self.cog.muted_channel_times.delete.assert_awaited_once_with(self.channel.id)
+
async def test_preserved_other_overwrites(self):
"""Channel's other unrelated overwrites were not changed."""
prev_overwrite_dict = dict(self.overwrite)