diff options
author | 2022-08-07 16:50:23 +0100 | |
---|---|---|
committer | 2022-08-07 16:50:23 +0100 | |
commit | d7d3dabfb8c79bd6966ef01af9be628421c40137 (patch) | |
tree | 61216f628d8be5aa83496c4eda2e65479f0e93cc | |
parent | Fix enabling/disabling of task loop (diff) |
Fix tests
-rw-r--r-- | bot/exts/backend/error_handler.py | 2 | ||||
-rw-r--r-- | tests/bot/exts/backend/test_error_handler.py | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/bot/exts/backend/error_handler.py b/bot/exts/backend/error_handler.py index ca1f152af..5c4aaf29f 100644 --- a/bot/exts/backend/error_handler.py +++ b/bot/exts/backend/error_handler.py @@ -95,7 +95,7 @@ class ErrorHandler(Cog): elif isinstance(e, errors.DisabledCommand): log.debug(debug_message) else: - # MaxConcurrencyReached, ExtensionError + # ExtensionError await self.handle_unexpected_error(ctx, e) async def send_command_help(self, ctx: Context) -> None: diff --git a/tests/bot/exts/backend/test_error_handler.py b/tests/bot/exts/backend/test_error_handler.py index 0a58126e7..f65d47aeb 100644 --- a/tests/bot/exts/backend/test_error_handler.py +++ b/tests/bot/exts/backend/test_error_handler.py @@ -171,12 +171,11 @@ class ErrorHandlerTests(unittest.IsolatedAsyncioTestCase): case["mock_function_to_call"].assert_awaited_once_with(self.ctx, case["error"].original) async def test_error_handler_two_other_errors(self): - """Should call `handle_unexpected_error` if error is `MaxConcurrencyReached` or `ExtensionError`.""" + """Should call `handle_unexpected_error` if error is `ExtensionError`.""" cog = ErrorHandler(self.bot) cog.handle_unexpected_error = AsyncMock() errs = ( - errors.MaxConcurrencyReached(1, MagicMock()), - errors.ExtensionError(name="foo") + errors.ExtensionError(name="foo"), ) for err in errs: |