Mirrored from https://github.com/davoodmehraban89/Aram.git
Synced Dec 3, 20:45 UTC
test(control): verify internal cash transfer totals against individual line trace
davoodmehraban89 committed
Oct 31, 2026 at 08:40 UTC
aded770a7e137b1edb2c8e71b8ff51acc2055009
1 file changed
+16
backend/tests/test_cross_statement_reconciliation.py
+16
@@ -337,3 +337,19 @@ def test_unclassified_cash_flow_line_cannot_pass_cross_statement_gate():
337
result = reconcile(cash_flow=replace(source, cash_flow_lines=tuple(lines)))
338
assert not result.cash_flow_bridge_valid
339
assert "CASH_FLOW_BRIDGE_INVALID" in result.findings
340
+
341
+
342
+def test_internal_cash_transfer_totals_must_be_derived_from_line_trace():
343
+ source = cash()
344
+ transfer = CashFlowLine(
345
+ "L3", "V3", "1404-01-03", "CASH1", "CASH2",
346
+ "CASH_TRANSFER", "10", "0", "SRC3", "CASH-POLICY",
347
+ )
348
+ bad = replace(
349
+ source, transaction_count=3,
350
+ cash_flow_lines=source.cash_flow_lines + (transfer,),
351
+ internal_transfer_inflows="9", internal_transfer_outflows="10",
352
+ )
353
+ result = reconcile(cash_flow=bad)
354
+ assert not result.cash_flow_bridge_valid
355
+ assert "CASH_FLOW_BRIDGE_INVALID" in result.findings