aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/bot/cogs/moderation/test_silence.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/bot/cogs/moderation/test_silence.py b/tests/bot/cogs/moderation/test_silence.py
index 765c324d2..b21f5f61a 100644
--- a/tests/bot/cogs/moderation/test_silence.py
+++ b/tests/bot/cogs/moderation/test_silence.py
@@ -233,8 +233,11 @@ class SilenceTests(unittest.IsolatedAsyncioTestCase):
@mock.patch.object(Silence, "notifier", create=True)
async def test_unsilence_private_removed_notifier(self, notifier):
"""Channel was removed from `notifier` on unsilence."""
- perm_overwrite = MagicMock(send_messages=False)
- channel = MockTextChannel(overwrites_for=Mock(return_value=perm_overwrite))
+ overwrite_json = '{"send_messages": true, "add_reactions": null}'
+ self.cog.muted_channel_perms.get.return_value = overwrite_json
+ channel = MockTextChannel()
+ channel.overwrites_for.return_value = PermissionOverwrite()
+
await self.cog._unsilence(channel)
notifier.remove_channel.assert_called_once_with(channel)