feat(shipping-notice): 增强发货通知候选管理功能,支持候选选择、重复检测与业务摘要修订
This commit is contained in:
1 parent
70f684b94a
commit
b595e157e9
83 files changed
+5857
-200
No files matched your search
@@ -1,5 +1,9 @@
|
||||
from app.services.shipping_notice.match import match_notice_lines
|
||||
from app.services.shipping_notice.reservation_id import normalize_reservation_id
|
||||
from app.services.shipping_notice.reservation_id import (
|
||||
is_valid_reservation_id,
|
||||
normalize_reservation_id,
|
||||
validated_reservation_id,
|
||||
)
|
||||
|
||||
|
||||
def test_match_numeric_reservation_id():
|
||||
@@ -13,3 +17,13 @@ def test_match_numeric_reservation_id():
|
||||
|
||||
def test_normalize_reservation_id_string():
|
||||
assert normalize_reservation_id("1000140351") == "1000140351"
|
||||
|
||||
|
||||
def test_reservation_contract_rejects_internal_hex_but_keeps_business_ids():
|
||||
"""硬契约应拒绝内部 hex 主键,同时兼容已有字母型业务 Reservation ID。"""
|
||||
assert not is_valid_reservation_id("1f1a682dfdc446a393415dee93eb36ce")
|
||||
assert validated_reservation_id("1f1a682dfdc446a393415dee93eb36ce") == ""
|
||||
assert is_valid_reservation_id("3000092917")
|
||||
assert is_valid_reservation_id("AWS-311")
|
||||
assert is_valid_reservation_id("R-1")
|
||||
assert not is_valid_reservation_id("AWS-311", numeric_only=True)
|
||||
Reference in new issue
Block a user