aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Numerlor <[email protected]>2020-03-11 15:33:05 +0100
committerGravatar Numerlor <[email protected]>2020-03-11 15:33:05 +0100
commit10428d9a456c7bce533cda53100e4c35930211d6 (patch)
tree9b83602162eccfb90d1080e794e5af8ac5cce938
parentReset `self.ctx` call history after every subtest. (diff)
Pass created channel instead of new object.
Creating a new object caused the assert to fail because different objects were used.
-rw-r--r--tests/bot/cogs/moderation/test_silence.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/bot/cogs/moderation/test_silence.py b/tests/bot/cogs/moderation/test_silence.py
index ab2f091ec..23f8a84ab 100644
--- a/tests/bot/cogs/moderation/test_silence.py
+++ b/tests/bot/cogs/moderation/test_silence.py
@@ -91,7 +91,7 @@ class SilenceTests(unittest.IsolatedAsyncioTestCase):
async def test_silence_private_removed_muted_channel(self):
channel = MockTextChannel()
with mock.patch.object(self.cog, "muted_channels") as muted_channels:
- await self.cog._silence(MockTextChannel(), False, None)
+ await self.cog._silence(channel, False, None)
muted_channels.add.assert_called_once_with(channel)
async def test_unsilence_private_for_false(self):