角色业务范围收紧工单与模板;报价日期不当费用;未选舱不迁已报价;另开一票可清违禁 hold
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -68,6 +68,19 @@ class JudgeTests(unittest.TestCase):
|
||||
self.assertEqual(hold3, "")
|
||||
self.assertEqual(edits.get("品名"), "服装")
|
||||
|
||||
def test_fresh_inquiry_clears_hold_without_cargo_rename(self) -> None:
|
||||
"""问过炸弹被拦后,再查吉隆坡费用应放行;不能继续套旧 hold。"""
|
||||
hold = "查一下广西到胡志明炸弹的费用"
|
||||
facts = {"品名": "炸弹", "起运港": "广西"}
|
||||
blocked, new_hold, _edits = judge(
|
||||
text="查一下目的地吉隆坡的费用",
|
||||
facts=facts,
|
||||
hold=hold,
|
||||
)
|
||||
self.assertFalse(blocked)
|
||||
self.assertEqual(new_hold, "")
|
||||
self.assertFalse(contains_blocked(str(facts.get("品名") or "")))
|
||||
|
||||
def test_rename_sentence_that_still_says_the_word_stays_blocked(self) -> None:
|
||||
blocked, hold, _edits = judge(text="不是炸弹,品名服装", facts={"品名": "服装"}, hold="")
|
||||
self.assertTrue(blocked)
|
||||
|
||||
Reference in New Issue
Block a user