test: 添加 profile settings 和 runtime models 单元测试
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
from pydantic import ValidationError
|
||||
|
||||
from schemas.agent.runtime_models import WorkerAgentOutputLite
|
||||
|
||||
|
||||
def test_worker_output_lite_rejects_divination_derived_from_llm() -> None:
|
||||
payload = {
|
||||
"status": "success",
|
||||
"sign_level": "中上签",
|
||||
"conclusion": ["结论"],
|
||||
"focus_points": ["重点"],
|
||||
"advice": ["建议"],
|
||||
"keywords": ["关键词一", "关键词二", "关键词三"],
|
||||
"answer": "最终答案",
|
||||
"divination_derived": {},
|
||||
}
|
||||
|
||||
with pytest.raises(ValidationError):
|
||||
WorkerAgentOutputLite.model_validate(payload)
|
||||
Reference in New Issue
Block a user