diff --git a/scripts/test_batch20_units.py b/scripts/test_batch20_units.py index 1c9a74c..94530d5 100644 --- a/scripts/test_batch20_units.py +++ b/scripts/test_batch20_units.py @@ -331,10 +331,15 @@ def _(): "raw": {"verdict": "REJECT", "confidence": 40}, "confidence": 40.0} out, got = _route(_open_cand(), values={}, judge_resp=low) assert not out["rejected"] and len(out["queued"]) == 1, out - assert "把握度只有 40" in out["queued"][0]["why"] and "交人" in out["queued"][0]["why"], out["queued"] + # 入队那句是"研判不可用"这一类的固定文案 (与真正的不可用同一条队列); 详细原因落在 + # 提议的研判理由里, 人在待确认队列点开能看到"把握度只有 40"。 + assert "研判不可用" in out["queued"][0]["why"], out["queued"] assert out["degraded"] is True - hn = got["proposals"][0]["hard_numbers"] + prop = got["proposals"][0] + hn = prop["hard_numbers"] assert hn["judge_verdict"] == "UNAVAILABLE" and hn["judge_conf"] == 40.0, hn + jr = str(prop.get("judge_reason") or hn.get("judge_reason") or "") + assert "把握度只有 40" in jr and "交人" in jr, (jr, prop) assert not [l for l in got["ledger"] if l["verdict"] == "REJECT"], got["ledger"] # 把握度够高的驳回照旧记驳回、杀提议 (老行为) high = {**low, "raw": {"verdict": "REJECT", "confidence": 85}, "confidence": 85.0}