fad458b2a7
- UIUX 文档:填充 19 个缺口(多主体画像/健康度/AI+看板/增长域/洞察域/创始人端/OODA/助推/商密) - UIUX 文档:插入 6 个新章节(十四~十九),旧章节重编号为二十~三十一,更新目录和交叉引用 - 作业指导书 x5:导航改为 6 域分组,新增 Context Bar/工作模式/Insight Rail/决策线程/多工作区等 UI 概念 - 新建 docs/2-task-uiux.md:50 个代码落地开发任务,按 P0-P6 分优先级 + 8 Sprint 规划 - 后端/前端:大量新增模型、路由、组件(来自之前 Phase 开发)
37 lines
1.1 KiB
Python
37 lines
1.1 KiB
Python
"""T3.3 人才引力场 Agent 测试。
|
|
|
|
测试人才流动预测和主动推荐。
|
|
"""
|
|
|
|
import pytest
|
|
|
|
from app.services.talent_agent import predict_talent_flow, recommend_talent
|
|
|
|
|
|
class TestPredictTalentFlow:
|
|
"""人才流动预测测试。"""
|
|
|
|
async def test_returns_dict(self):
|
|
"""返回预测结果字典。"""
|
|
result = await predict_talent_flow("张三,AI 算法工程师,3 年经验,当前在 A 公司")
|
|
assert isinstance(result, dict)
|
|
|
|
async def test_empty_input(self):
|
|
"""空输入返回字典。"""
|
|
result = await predict_talent_flow("")
|
|
assert isinstance(result, dict)
|
|
|
|
|
|
class TestRecommendTalent:
|
|
"""人才推荐测试。"""
|
|
|
|
async def test_returns_list(self):
|
|
"""返回推荐列表。"""
|
|
result = await recommend_talent("需要 AI 算法工程师 1 名", "张三:AI 工程师;李四:数据科学家")
|
|
assert isinstance(result, list)
|
|
|
|
async def test_empty_input(self):
|
|
"""空输入返回空列表。"""
|
|
result = await recommend_talent("", "")
|
|
assert isinstance(result, list)
|