私聊改口成普通货后不再被上一句违禁词拦住。
销售说运送衣服、改成衣服时,按新品名继续询价。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -157,6 +157,20 @@ class SeaPrivateFlowTests(unittest.TestCase):
|
||||
joined = "\n".join(self.replies)
|
||||
self.assertNotIn(BLOCK_REPLY, joined)
|
||||
|
||||
def test_oral_restatement_clears_previous_bomb(self) -> None:
|
||||
"""销售不说「品名改为」,直接重说运送衣服,或说改成衣服。"""
|
||||
hold = "10月30日,从广州去深圳,运送炸弹,请报价"
|
||||
facts = {"品名": "炸弹", "起运港": "广州"}
|
||||
for text in (
|
||||
"10月30日,从广州去深圳,运送衣服,请报价",
|
||||
"炸弹错了,给我改成衣服",
|
||||
"炸弹换衣服",
|
||||
):
|
||||
blocked, new_hold, edits = judge(text=text, facts=dict(facts), hold=hold)
|
||||
self.assertFalse(blocked, text)
|
||||
self.assertEqual(new_hold, "", text)
|
||||
self.assertEqual(edits.get("品名"), "衣服", text)
|
||||
|
||||
def test_weight_alone_does_not_clear(self) -> None:
|
||||
facts = dict(COMPLETE_SEA)
|
||||
facts["品名"] = "弹药"
|
||||
|
||||
Reference in New Issue
Block a user