diff options
| author | 2020-06-24 15:21:00 +0300 | |
|---|---|---|
| committer | 2020-06-24 15:21:00 +0300 | |
| commit | 4430e590ece503c262419324e2bc47dbaa5823d2 (patch) | |
| tree | b34d0aa96e776fed3db072455fed278d6a8091d6 /tests | |
| parent | Replace `True` test with `In` test on `test_post_user` (diff) | |
Merge 2 if-else branches is `test_post_user`
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/bot/cogs/moderation/test_utils.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/bot/cogs/moderation/test_utils.py b/tests/bot/cogs/moderation/test_utils.py index 5be703bc6..f4c634936 100644 --- a/tests/bot/cogs/moderation/test_utils.py +++ b/tests/bot/cogs/moderation/test_utils.py @@ -272,14 +272,11 @@ class ModerationUtilsTests(unittest.IsolatedAsyncioTestCase): if raise_error: self.assertIsNone(result) + self.ctx.send.assert_awaited_once() + self.assertIn(str(raise_error.status), self.ctx.send.call_args[0][0]) else: self.assertEqual(result, post_result) - - if not raise_error: self.bot.api_client.post.assert_awaited_once_with("bot/users", json=payload) - else: - self.ctx.send.assert_awaited_once() - self.assertIn(str(raise_error.status), self.ctx.send.call_args[0][0]) if isinstance(user, MagicMock): log_mock.debug.assert_called_once() |