员工岗位可重新启用;调价认空运航线;会话存档跳号补拉;陆运报价按车型列回填
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -12,6 +12,7 @@ from agent.policy.deal_followup import (
|
||||
SHANGHAI,
|
||||
add_workday_hours,
|
||||
air_route_keys,
|
||||
air_staff_route_matches,
|
||||
is_workday,
|
||||
leader_matches,
|
||||
next_followup_at,
|
||||
@@ -193,5 +194,37 @@ class TestLeaderMatch(unittest.TestCase):
|
||||
)
|
||||
|
||||
|
||||
class TestAirStaffRouteMatches(unittest.TestCase):
|
||||
"""群 @ 航线:按负责线路过滤,不要求 isLeader。"""
|
||||
|
||||
def test_ehu_ord_pair_and_all_line(self) -> None:
|
||||
facts = {"起运港": "EHU", "目的港": "ORD"}
|
||||
self.assertTrue(air_staff_route_matches(routes="EHU-ORD", facts=facts))
|
||||
self.assertTrue(air_staff_route_matches(routes="空运全线", facts=facts))
|
||||
self.assertFalse(air_staff_route_matches(routes="CGO-KUL,SZX-KUL", facts=facts))
|
||||
self.assertFalse(air_staff_route_matches(routes="HKG-KUL,NKG-KUL", facts=facts))
|
||||
|
||||
def test_dest_only_matches_pair_suffix(self) -> None:
|
||||
facts = {"目的港": "KUL"}
|
||||
self.assertTrue(air_staff_route_matches(routes="CGO-KUL,SZX-KUL", facts=facts))
|
||||
self.assertTrue(air_staff_route_matches(routes="HKG-KUL,NKG-KUL", facts=facts))
|
||||
self.assertFalse(air_staff_route_matches(routes="EHU-ORD", facts=facts))
|
||||
self.assertFalse(air_staff_route_matches(routes="CGO-BLR,CGO-MAA", facts=facts))
|
||||
|
||||
def test_non_leader_still_matches(self) -> None:
|
||||
# 群 @ 与成交推负责人不同:非负责人只要线路对也要 @
|
||||
facts = {"起运港": "EHU", "目的港": "ORD"}
|
||||
self.assertTrue(air_staff_route_matches(routes="EHU-ORD", facts=facts))
|
||||
self.assertFalse(
|
||||
leader_matches(
|
||||
role_code="air",
|
||||
routes="EHU-ORD",
|
||||
is_leader=False,
|
||||
business_line="AIR",
|
||||
facts=facts,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user