diff options
author | 2022-02-16 22:48:09 +0000 | |
---|---|---|
committer | 2022-02-16 22:48:09 +0000 | |
commit | 7e8e95f07e343f1d7d9a8069b6cdb1a9fcbb00d7 (patch) | |
tree | 7d97116e91f4fd8b2295a41ef01b8bf59f532bdb /tests | |
parent | Merge pull request #2033 from python-discord/purge-to-clean (diff) |
Remove unnecessary Infraction conversion in clean ban (#2092)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bot/exts/moderation/infraction/test_infractions.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/bot/exts/moderation/infraction/test_infractions.py b/tests/bot/exts/moderation/infraction/test_infractions.py index 8bed1e386..052048053 100644 --- a/tests/bot/exts/moderation/infraction/test_infractions.py +++ b/tests/bot/exts/moderation/infraction/test_infractions.py @@ -305,18 +305,16 @@ class CleanBanTests(unittest.IsolatedAsyncioTestCase): attempt_delete_invocation=False, ) - @patch("bot.exts.moderation.infraction.infractions.Infraction") - async def test_cleanban_edits_infraction_reason(self, mocked_infraction_converter): + async def test_cleanban_edits_infraction_reason(self): """Ensure cleanban edits the ban reason with a link to the clean log.""" self.bot.get_cog.side_effect = self.mock_get_cog(True, True) self.management_cog.infraction_append = AsyncMock() - mocked_infraction_converter.return_value.convert = AsyncMock(return_value=42) self.assertIsNone(await self.cog.cleanban(self.cog, self.ctx, self.user, None, reason="FooBar")) self.management_cog.infraction_append.assert_awaited_once_with( self.ctx, - 42, + {"id": 42}, None, reason=f"[Clean log]({self.log_url})" ) |