diff options
author | 2021-07-15 15:25:12 -0700 | |
---|---|---|
committer | 2021-07-15 15:25:12 -0700 | |
commit | af3c1459ba491e748339545687a8939b4dd70e43 (patch) | |
tree | f83116fd6804c8f5e2e5d1e6f50122bd6f6bd572 /tests | |
parent | Remove unnecessary config constant (diff) |
Add util function to send an infraction using an Infraction dict
There was some redundant pre-processing of arguments happening before
calling `notify_infraction`.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bot/exts/moderation/infraction/test_utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/bot/exts/moderation/infraction/test_utils.py b/tests/bot/exts/moderation/infraction/test_utils.py index 50a717bb5..d35120992 100644 --- a/tests/bot/exts/moderation/infraction/test_utils.py +++ b/tests/bot/exts/moderation/infraction/test_utils.py @@ -124,7 +124,7 @@ class ModerationUtilsTests(unittest.IsolatedAsyncioTestCase): self.ctx.send.assert_not_awaited() @patch("bot.exts.moderation.infraction._utils.send_private_embed") - async def test_notify_infraction(self, send_private_embed_mock): + async def test_send_infraction_embed(self, send_private_embed_mock): """ Should send an embed of a certain format as a DM and return `True` if DM successful. @@ -230,7 +230,7 @@ class ModerationUtilsTests(unittest.IsolatedAsyncioTestCase): send_private_embed_mock.reset_mock() send_private_embed_mock.return_value = case["send_result"] - result = await utils.notify_infraction(*case["args"]) + result = await utils.send_infraction_embed(*case["args"]) self.assertEqual(case["send_result"], result) |