diff --git a/tests/test_reconcile.py b/tests/test_reconcile.py index 9d58eb77b0cc60b95ca147939bdfcfc192d0c661..292de3648d6476d04415aba9ffc7300da6fe9dc9 100644 --- a/tests/test_reconcile.py +++ b/tests/test_reconcile.py @@ -7,6 +7,7 @@ import textwrap from conservancy_beancount.reconcile.statement_reconciler import ( date_proximity, + format_output, match_statement_and_books, metadata_for_match, payee_match, @@ -379,3 +380,11 @@ def test_handles_fr_csv(): }, ] assert read_fr_csv(io.StringIO(CSV)) == expected + + +def test_format_output(): + statement = [S1] + books = [B1] + matches, _, _ = match_statement_and_books(statement, books) + output = format_output(matches, datetime.date(2022, 1, 1), datetime.date(2022, 2, 1), 'test.csv', True) + assert '2022-01-01: 10.00 Patreon / Patreon / 12345 → 2022-01-01: 10.00 Patreon ✓ Matched' in output