@@ -216,6 +216,47 @@ class SeaTextInquiryTests(unittest.TestCase):
|
||||
self.assertTrue(check["ok"])
|
||||
self.assertEqual(check["facts"]["运输分类"], "Port to Port")
|
||||
|
||||
def test_inquiry_card_lists_ten_fields(self) -> None:
|
||||
lines = copy.inquiry_field_lines(
|
||||
work_order_no="WO202609200001",
|
||||
facts={
|
||||
"起运港": "上海",
|
||||
"目的港": "洛杉矶",
|
||||
"品名": "普货",
|
||||
"货量": "20吨",
|
||||
"整柜或拼柜": "整柜",
|
||||
"箱型箱量": "1x40HQ",
|
||||
"贸易条款": "FOB",
|
||||
"运输分类": "Port to Port",
|
||||
"报价日期": "2026-09-20",
|
||||
},
|
||||
transport_mode="海运",
|
||||
)
|
||||
text = "\n".join(lines)
|
||||
self.assertIn("工单号:WO202609200001", text)
|
||||
self.assertIn("贸易条款:FOB", text)
|
||||
self.assertIn("运输分类:Port to Port", text)
|
||||
self.assertLess(text.index("箱型箱量"), text.index("贸易条款"))
|
||||
self.assertLess(text.index("贸易条款"), text.index("运输分类"))
|
||||
|
||||
def test_clarify_asks_class_as_two_options(self) -> None:
|
||||
text = copy.ask_clarify(
|
||||
facts={
|
||||
"起运港": "上海",
|
||||
"目的港": "洛杉矶",
|
||||
"品名": "服装",
|
||||
"货量": "1柜",
|
||||
"整柜或拼柜": "整柜",
|
||||
"箱型箱量": "1x40HQ",
|
||||
"贸易条款": "FOB",
|
||||
},
|
||||
missing_keys=["运输分类"],
|
||||
transport_mode="海运",
|
||||
)
|
||||
self.assertIn("Port to Port", text)
|
||||
self.assertIn("其他", text)
|
||||
self.assertIn("贸易条款:FOB", text)
|
||||
|
||||
def test_complete_sea_inquiry_card_uses_seven_fields(self) -> None:
|
||||
phase = self.flow.on_text(
|
||||
sender_id="s1",
|
||||
|
||||
Reference in New Issue
Block a user