File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 66from unittest .mock import AsyncMock , Mock
77
88import pytest
9- from uipath .core .errors import UiPathPendingTriggerError
9+ from uipath .core .errors import ErrorCategory , UiPathPendingTriggerError
1010
1111from 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
You can’t perform that action at this time.
0 commit comments