diff options
| author | 2020-03-13 07:25:43 +0000 | |
|---|---|---|
| committer | 2020-03-13 07:25:43 +0000 | |
| commit | 3043dd1d565943f180a5ae16e46e6daa531466c7 (patch) | |
| tree | 416f3c264a6d4fb701349635abcd934a246032ea /tests | |
| parent | Revise docstrings for moderation util tests (diff) | |
(Moderation Utils Tests): Added 2 call check to `post_infraction` test.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/bot/cogs/moderation/test_utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/bot/cogs/moderation/test_utils.py b/tests/bot/cogs/moderation/test_utils.py index ca951250f..659884d93 100644 --- a/tests/bot/cogs/moderation/test_utils.py +++ b/tests/bot/cogs/moderation/test_utils.py @@ -1,6 +1,6 @@ import unittest from datetime import datetime -from unittest.mock import AsyncMock, MagicMock, patch +from unittest.mock import AsyncMock, MagicMock, call, patch from discord import Embed, Forbidden, HTTPException, NotFound @@ -377,5 +377,5 @@ class TestPostInfraction(unittest.IsolatedAsyncioTestCase): actual = await utils.post_infraction(self.ctx, self.user, "mute", "Test reason") self.assertEqual(actual, "foo") - self.bot.api_client.post.assert_awaited_with("bot/infractions", json=payload) + self.bot.api_client.post.assert_has_awaits([call("bot/infractions", json=payload)] * 2) post_user_mock.assert_awaited_once_with(self.ctx, self.user) |