diff --git a/tests/test_meta_repo_links.py b/tests/test_meta_repo_links.py index 4c44e46c5292bc0a63fd0fb1c866d913553c0814..5c0b0050c5ef4b68d7362ce1005c1aeb2d12f38e 100644 --- a/tests/test_meta_repo_links.py +++ b/tests/test_meta_repo_links.py @@ -100,6 +100,16 @@ def test_bad_post_links(hook): actual = {error.message for error in hook.run(txn)} assert expected == actual +def test_flagged_txn_not_checked(hook): + keys = iter(METADATA_KEYS) + txn_meta = build_meta(keys, BAD_LINKS) + txn_meta['flag'] = '!' + txn = testutil.Transaction(**txn_meta, postings=[ + ('Income:Donations', -5, build_meta(keys, BAD_LINKS)), + ('Assets:Checking', 5, build_meta(keys, BAD_LINKS)), + ]) + assert not list(hook.run(txn)) + @pytest.mark.parametrize('value', testutil.NON_STRING_METADATA_VALUES) def test_bad_metadata_type(hook, value): txn = testutil.Transaction(**{'check': value}, postings=[