23 lines
648 B
Python
23 lines
648 B
Python
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)
|