16 lines
539 B
Python
16 lines
539 B
Python
from app.routers import reconciliation
|
|
|
|
|
|
def test_fold_reported_good_quantity_rows_uses_allocation_month_for_latest_process_only():
|
|
rows = [
|
|
("嘉恒", "产品A", "1序", 7, 999),
|
|
("嘉恒", "产品A", "2序", 7, 350),
|
|
("嘉恒", "产品A", "2序", 8, 300),
|
|
]
|
|
latest_processes = {("嘉恒", "产品A"): {"2序"}}
|
|
|
|
totals = reconciliation._fold_reported_good_quantity_rows(rows, latest_processes)
|
|
|
|
assert totals[("嘉恒", "产品A", 7)] == 350
|
|
assert totals[("嘉恒", "产品A", 8)] == 300
|