@@ -183,12 +183,24 @@ def test_not_required_on_opening(hook):
txn = testutil.Transaction(postings=[
('Assets:PayPal', 1000),
(next(testutil.OPENING_EQUITY_ACCOUNTS), -1000),
])
assert not list(hook.run(txn))
def test_still_required_on_flagged_txn(hook):
txn = testutil.Transaction(flag='!', postings=[
('Income:Donations', -1000),
assert list(hook.run(txn))
@pytest.mark.parametrize('account,src_value', testutil.combine_values(
ACCOUNTS,
testutil.FIXME_VALUES,
))
def test_flagged_fixme_ok(hook, account, src_value):
(account, 200, {TEST_KEY: src_value}),
('Income:Donations', -200),
testutil.check_post_meta(txn, {TEST_KEY: src_value}, None)