|
|
@@ -13,12 +13,14 @@ from services.output_presenter import OutputPresenter
|
|
|
LIST_KEYS = [
|
|
|
'outbound_number', 'direct_send', 'remark', 'cargo_type',
|
|
|
'warehouse_name', 'status', 'so_number', 'container_code',
|
|
|
- 'seal_number', 'container_type', 'shipping_method', 'total_volume',
|
|
|
- 'total_weight', 'ship_schedule', 'closing_time', 'est_loading_time',
|
|
|
- 'operator', 'operation_modes', 'operation_time',
|
|
|
- 'ship_company', 'vessel_name', 'cutoff_time_si', 'clearance_port',
|
|
|
- 'loading_port', 'destination_port', 'transit_port', 'etd', 'eta',
|
|
|
- 'has_fda', 'has_cpsc', 'has_food',
|
|
|
+ 'seal_number', 'container_type', 'cabinet_type', 'shipping_method',
|
|
|
+ 'total_volume', 'total_weight', 'ship_schedule', 'closing_time',
|
|
|
+ 'est_loading_time', 'operator', 'operation_modes', 'handle_method',
|
|
|
+ 'operation_time', 'ship_company', 'vessel_name', 'route',
|
|
|
+ 'cutoff_time_si', 'clearance_port', 'clearance_port_eta',
|
|
|
+ 'loading_port', 'destination_port', 'wharf_name', 'transit_port',
|
|
|
+ 'etd', 'eta', 'ata', 'clearance_release_time', 'overseas_warehouse',
|
|
|
+ 'providers_name', 'has_fda', 'has_cpsc', 'has_food',
|
|
|
]
|
|
|
|
|
|
DETAIL_KEYS = [
|
|
|
@@ -359,13 +361,22 @@ class OutboundQueryToolTest(unittest.TestCase):
|
|
|
|
|
|
self.assertFalse(result['is_error'])
|
|
|
content = result['structured_content']
|
|
|
- self.assertEqual(31, len(content['headers']))
|
|
|
- self.assertEqual(31, len(content['rows'][0]))
|
|
|
+ self.assertEqual(40, len(content['headers']))
|
|
|
+ self.assertEqual(40, len(content['rows'][0]))
|
|
|
serialized = json.dumps(content, ensure_ascii=False)
|
|
|
for key in LIST_KEYS:
|
|
|
self.assertNotIn(key, serialized)
|
|
|
self.assertIn('排舱单号', serialized)
|
|
|
self.assertIn('拖报清方式', serialized)
|
|
|
+ self.assertIn('航线', serialized)
|
|
|
+ self.assertIn('清关口岸ETA', serialized)
|
|
|
+ self.assertIn('整拼类型', serialized)
|
|
|
+ self.assertIn('操作方式', serialized)
|
|
|
+ self.assertIn('清关放行时间', serialized)
|
|
|
+ self.assertIn('ATA', serialized)
|
|
|
+ self.assertIn('到港码头', serialized)
|
|
|
+ self.assertIn('海外仓', serialized)
|
|
|
+ self.assertIn('拖车行', serialized)
|
|
|
|
|
|
def test_detail_presenter_outputs_eleven_item_summary_and_thirty_four_fields(self):
|
|
|
presenter = OutputPresenter()
|