test(backend): update service tests

- test_orchestrator_service.py: update orchestrator service tests
- test_user_agent_service.py: update user agent service tests
This commit is contained in:
caoxiaozhu
2026-05-12 07:20:59 +00:00
parent a3d40ad9f5
commit bff20d8eb3
2 changed files with 59 additions and 11 deletions

View File

@@ -382,7 +382,13 @@ def test_orchestrator_treats_expense_narrative_as_draft_instead_of_ar_query() ->
assert payload["trace_summary"]["intent"] == "draft"
assert payload["trace_summary"]["tool_count"] == 0
assert "应收场景数据" not in payload["result"]["message"]
assert "请补充" in payload["result"]["message"]
assert payload["result"]["message"] == "相关识别信息已在右侧展示,请核对。当前信息还未补齐,可点击“修改”继续补充,或先“保存草稿”。"
review_payload = payload["result"]["review_payload"]
assert review_payload["intent_summary"].startswith("系统识别出您想要报销业务招待费。")
assert review_payload["missing_slots"] == ["客户名称", "参与人员", "票据附件"]
slot_map = {item["key"]: item for item in review_payload["slot_cards"]}
assert slot_map["location"]["value"] == "客户现场"
assert slot_map["amount"]["value"] == "1000.00元"
def test_orchestrator_can_restore_latest_user_conversation() -> None: