Skip to content

Commit cf9810a

Browse files
committed
fix: tests related to uipathpendingtriggererror
1 parent 5a80ed7 commit cf9810a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_resumable.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from unittest.mock import AsyncMock, Mock
77

88
import pytest
9-
from uipath.core.errors import UiPathPendingTriggerError
9+
from uipath.core.errors import ErrorCategory, UiPathPendingTriggerError
1010

1111
from uipath.runtime import (
1212
UiPathExecuteOptions,
@@ -195,7 +195,7 @@ async def test_resumable_adds_only_new_triggers_on_partial_resume():
195195
async def read_trigger_impl(trigger: UiPathResumeTrigger) -> dict[str, Any]:
196196
if trigger.interrupt_id == "int-1":
197197
return {"approved": True}
198-
raise UiPathPendingTriggerError("still pending")
198+
raise UiPathPendingTriggerError(ErrorCategory.USER, "still pending")
199199

200200
# Replace the mock with new side_effect
201201
trigger_manager.read_trigger = AsyncMock(side_effect=read_trigger_impl) # type: ignore
@@ -235,7 +235,7 @@ async def test_resumable_completes_after_all_triggers_resolved():
235235
async def read_trigger_impl_2(trigger: UiPathResumeTrigger) -> dict[str, Any]:
236236
if trigger.interrupt_id == "int-1":
237237
return {"approved": True}
238-
raise UiPathPendingTriggerError("pending")
238+
raise UiPathPendingTriggerError(ErrorCategory.USER, "pending")
239239

240240
trigger_manager.read_trigger = AsyncMock(side_effect=read_trigger_impl_2) # type: ignore
241241

0 commit comments

Comments
 (0)