diff options
| author | 2020-03-05 20:01:34 +0200 | |
|---|---|---|
| committer | 2020-03-05 20:01:34 +0200 | |
| commit | 7dfac36ab5d513fada631e6d473915e05eafe778 (patch) | |
| tree | a3634e36fba4a9afb31ae7ebfe36f9c603ab1c67 /tests | |
| parent | (Moderation Utils Tests): Added additional assertions to `post_infraction` test. (diff) | |
(Moderation Utils Tests): Fixed errors, added checks before assertions for errors
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/bot/cogs/moderation/test_utils.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/bot/cogs/moderation/test_utils.py b/tests/bot/cogs/moderation/test_utils.py index c5b8f380f..7f94f20e8 100644 --- a/tests/bot/cogs/moderation/test_utils.py +++ b/tests/bot/cogs/moderation/test_utils.py @@ -317,7 +317,10 @@ class ModerationUtilsTests(unittest.IsolatedAsyncioTestCase): else: self.assertEqual(result, expected) - self.bot.api_client.post.assert_awaited_once_with("bot/users", json=payload) + if not error: + self.bot.api_client.post.assert_awaited_once_with("bot/users", json=payload) + + self.bot.api_client.post.reset_mock(side_effect=True) async def test_send_private_embed(self): """Test does `send_private_embed` return correct value.""" |