diff --git a/tests/test_reports_accrual.py b/tests/test_reports_accrual.py index fc1e197a0d4348edba9aaa243d78b6424318b2a5..c98295905cafd16d4e3cadb51bd05d10f8c82f38 100644 --- a/tests/test_reports_accrual.py +++ b/tests/test_reports_accrual.py @@ -510,9 +510,16 @@ def test_outgoing_report(accrual_postings, caplog): r'^TOTAL TO PAY: \$280\.00$', fr'^AGREEMENT: {contract_url}', r'^BEANCOUNT ENTRIES:$', - # For each transaction, check for the date line, a metadata, and the - # Expenses posting. - r'^\s*2010-06-10\s', + ]) + # Find the date line of the first transaction. + # For each transaction, check for the date line, a metadata, and the + # Expenses posting. + for line in output: + if not line.isspace(): + break + assert re.match(r'\s*2010-06-10\s', line), \ + "first entry line did not have expected date" + check_output(output, [ fr'^\s+rt-id: "{rt_id_url}"$', r'^\s+Expenses:Services:Legal\s+220\.00 USD$', r'^\s*2010-06-10\s',