From f86bd795ee0e80b4e511946231dfd74ae2392f75 Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Fri, 2 Feb 2024 16:22:05 +0000 Subject: Replace aliased errors with TimeoutError --- tests/bot/exts/moderation/test_incidents.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') 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`!") -- cgit v1.2.3