diff options
author | 2020-05-18 16:25:59 +0300 | |
---|---|---|
committer | 2020-05-18 16:25:59 +0300 | |
commit | 800909176c3799b12d8bbb41fba4be336b199933 (patch) | |
tree | 1d2a6dbbd3c2c3f2a90b6dc6a368b9432d114157 | |
parent | EH Tests: Added test for 3 errors handling on handler (diff) |
EH Tests: Created test for all other errors
-rw-r--r-- | tests/bot/cogs/test_error_handler.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/bot/cogs/test_error_handler.py b/tests/bot/cogs/test_error_handler.py index bc67e9d7c..d0a5ba21b 100644 --- a/tests/bot/cogs/test_error_handler.py +++ b/tests/bot/cogs/test_error_handler.py @@ -151,3 +151,11 @@ class ErrorHandlerTests(unittest.IsolatedAsyncioTestCase): cog.handle_unexpected_error.reset_mock() self.assertIsNone(await cog.on_command_error(self.ctx, err)) cog.handle_unexpected_error.assert_awaited_once_with(self.ctx, err) + + @patch("bot.cogs.error_handler.log") + async def test_error_handler_other_errors(self, log_mock): + """Should `log.debug` other errors.""" + cog = ErrorHandler(self.bot) + error = errors.DisabledCommand() # Use this just as a other error + self.assertIsNone(await cog.on_command_error(self.ctx, error)) + log_mock.debug.assert_called_once() |