feat(shipping-notice): 实现货代发货通知的库存全流程与对话交互
This commit is contained in:
1 parent
a5cc48b6aa
commit
2607f4a9f6
26 files changed
+5013
-256
No files matched your search
@@ -0,0 +1,15 @@
|
||||
from app.services.shipping_notice.match import match_notice_lines
|
||||
from app.services.shipping_notice.reservation_id import normalize_reservation_id
|
||||
|
||||
|
||||
def test_match_numeric_reservation_id():
|
||||
notice = [{"sku": "10-40594-001", "reservation_id": "1000140351", "qty": 2}]
|
||||
inventory = [{"sku": "10-40594-001", "reservation_id": 1000140351.0, "available_qty": 3}]
|
||||
status, results, _ = match_notice_lines(notice, inventory)
|
||||
assert status == "fulfillable"
|
||||
assert results[0]["reservation_id"] == "1000140351"
|
||||
assert results[0]["available_qty"] == 3
|
||||
|
||||
|
||||
def test_normalize_reservation_id_string():
|
||||
assert normalize_reservation_id("1000140351") == "1000140351"
|
||||
Reference in new issue
Block a user