@@ -141,6 +141,17 @@ def test_missing_invoice(hook, acct1, acct2):
actual = {error.message for error in hook.run(txn)}
assert actual == {"{} missing {}".format(acct1, TEST_KEY)}
def test_not_required_on_opening(hook):
txn = testutil.OpeningBalance()
assert not list(hook.run(txn))
@pytest.mark.parametrize('acct1,acct2', testutil.combine_values(
REQUIRED_ACCOUNTS,
NON_REQUIRED_ACCOUNTS,
))
def test_not_required_on_flagged(acct1, acct2, hook):
txn = testutil.Transaction(flag='!', postings=[
(acct1, 25),
(acct2, -25),
])