test: 补齐规格纠偏安全场景 (#258)

This commit is contained in:
chengma
2026-08-17 18:37:39 +08:00
parent be900b2411
commit 29cf66ce96
4 changed files with 138 additions and 11 deletions
@@ -375,6 +375,20 @@ class PurchaseSpecResolutionContractVectorTest(unittest.TestCase):
elif mutation == "attempt_id_too_long":
request["attempt_id"] = "a" * 192
key = _idempotency_key(task_id, request)
elif mutation == "candidate_count_101":
request["candidates"] = [
{
"candidate_id": f"c{index}",
"raw_text": f"测试尺码{index}",
"options": {
"color": "测试黑",
"size": f"测试尺码{index}",
},
}
for index in range(1, 102)
]
request["candidate_snapshot_hash"] = _snapshot_hash(request)
key = _idempotency_key(task_id, request)
elif mutation == "body_too_large":
request["future_padding"] = "x" * (64 * 1024)
elif mutation == "task_not_found":