diff --git a/tests/test_meta_receipt.py b/tests/test_meta_receipt.py index 842064ea0902b0991a144a5dcdf4baba4536bb71..d189c9b8568ae520e062e7feeea291910258ae48 100644 --- a/tests/test_meta_receipt.py +++ b/tests/test_meta_receipt.py @@ -344,6 +344,24 @@ def test_fallback_on_zero_amount_postings(hook, test_pair, other_acct, value): ]) assert not list(hook.run(txn)) +@pytest.mark.parametrize('test_acct', ( + acct for acct in ACCOUNTS + if acct.name.startswith('Assets:') + and acct.required_types & PostType.CREDIT +)) +def test_not_required_on_interest(hook, test_acct): + check(hook, test_acct, 'Income:Interest', None, + check_type=PostType.CREDIT) + +@pytest.mark.parametrize('test_acct', ( + acct for acct in ACCOUNTS + if acct.name.startswith('Assets:') + and acct.required_types & PostType.DEBIT +)) +def test_required_on_reverse_interest(hook, test_acct): + check(hook, test_acct, 'Income:Interest', {test_acct.missing_message()}, + check_type=PostType.DEBIT) + @pytest.mark.parametrize('test_acct,equity_acct', testutil.combine_values( ACCOUNTS, testutil.OPENING_EQUITY_ACCOUNTS,