diff options
| author | 2020-03-11 15:33:05 +0100 | |
|---|---|---|
| committer | 2020-03-11 15:33:05 +0100 | |
| commit | 10428d9a456c7bce533cda53100e4c35930211d6 (patch) | |
| tree | 9b83602162eccfb90d1080e794e5af8ac5cce938 /tests | |
| parent | Reset `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.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/bot/cogs/moderation/test_silence.py | 2 |
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): |