diff options
author | 2024-02-02 16:22:05 +0000 | |
---|---|---|
committer | 2024-02-02 16:22:05 +0000 | |
commit | f86bd795ee0e80b4e511946231dfd74ae2392f75 (patch) | |
tree | 04ed406fad18571c0d36f06330a961f063bace21 /tests | |
parent | Move ruff config to new sections (diff) |
Replace aliased errors with TimeoutError
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bot/exts/moderation/test_incidents.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/bot/exts/moderation/test_incidents.py b/tests/bot/exts/moderation/test_incidents.py index d8e3ddd8c..444bb1142 100644 --- a/tests/bot/exts/moderation/test_incidents.py +++ b/tests/bot/exts/moderation/test_incidents.py @@ -557,7 +557,7 @@ class TestProcessEvent(TestIncidents): exception should it propagate out of `process_event`. This is so that we can then manually fail the test with a more informative message than just the plain traceback. """ - mock_task = AsyncMock(side_effect=asyncio.TimeoutError()) + mock_task = AsyncMock(side_effect=TimeoutError()) try: with patch("bot.exts.moderation.incidents.Incidents.make_confirmation_task", mock_task): @@ -566,7 +566,7 @@ class TestProcessEvent(TestIncidents): incident=MockMessage(id=123, created_at=CURRENT_TIME), member=MockMember(roles=[MockRole(id=1)]) ) - except asyncio.TimeoutError: + except TimeoutError: self.fail("TimeoutError was not handled gracefully, and propagated out of `process_event`!") |