fix(api-tests): use asyncio run in cs1 tests
All checks were successful
CD Pipeline / tests (push) Successful in 1m23s
Code Review / ai-code-review (push) Successful in 11s
CD Pipeline / build-and-deploy (push) Successful in 7m29s
CD Pipeline / post-deploy-checks (push) Successful in 2m34s

This commit is contained in:
Your Name
2026-05-31 12:30:09 +08:00
parent a192e5f56b
commit 514c201ff4
2 changed files with 3 additions and 4 deletions

View File

@@ -104,9 +104,7 @@ def _run_cs1_block(
_cs1_auto_approval = MagicMock()
_cs1_executor = ApprovalExecutionService()
asyncio.get_event_loop().run_until_complete(
_cs1_executor.execute_approved_action(_cs1_auto_approval)
)
asyncio.run(_cs1_executor.execute_approved_action(_cs1_auto_approval))
return mock_executor_cls, mock_exec_instance
@@ -217,7 +215,7 @@ class TestCS1AutoExecuteFailureDegradation:
except Exception:
pass # 降級:維持 PENDING
asyncio.get_event_loop().run_until_complete(_simulate())
asyncio.run(_simulate())
except Exception:
raised = True