test: align backend boundary and schema contract tests with current behavior

This commit is contained in:
Eric Wang
2026-10-19 13:32:34 +08:00
parent a6ce570499
commit a9a1393f64
3 changed files with 9 additions and 6 deletions
+1
View File
@@ -48,6 +48,7 @@ async def test_non_stream_chat_uses_backend_neutral_result():
session_id="session-001",
text="发生了交通事故",
need_form_update=True,
client_mode="direct",
)
]
+2 -1
View File
@@ -83,6 +83,7 @@ def test_chat_request_defaults_are_backward_compatible() -> None:
assert request.model_dump() == {
**chat_request_payload(),
"clientMode": "direct",
"needFormUpdate": False,
"useTextChunk": False,
}
@@ -159,7 +160,7 @@ def test_required_fields_remain_required(
(ProcessRequest_get, get_request_payload, "sessionId", "s" * 65),
(ProcessRequest_set, set_request_payload, "timeStamp", "t" * 33),
(ProcessResponse_chat, chat_response_payload, "nextStage", "n" * 33),
(ProcessResponse_chat, chat_response_payload, "nextStageCode", "10020"),
(ProcessResponse_chat, chat_response_payload, "nextStageCode", "s" * 33),
(ProcessResponse_chat, chat_response_payload, "code", "10000"),
(ProcessResponse_get, get_response_payload, "code", "10000"),
(ProcessResponse_set, set_response_payload, "code", "10000"),