diff --git a/tests/test_meta_rt_links.py b/tests/test_meta_rt_links.py index 6f95c2e3c5ac8cf187a658a9de42f0d188b4ea12..fa6f2bfa63169d3f04fee2c2778a96303f454cdf 100644 --- a/tests/test_meta_rt_links.py +++ b/tests/test_meta_rt_links.py @@ -146,6 +146,16 @@ def test_docs_outside_rt_not_checked(hook, ext_doc): actual = {error.message for error in hook.run(txn)} assert expected == actual +def test_flagged_txn_not_checked(hook): + txn_meta = build_meta(None, MALFORMED_LINKS) + txn_meta['flag'] = '!' + keys = iter(METADATA_KEYS) + txn = testutil.Transaction(**txn_meta, postings=[ + ('Income:Donations', -5, build_meta(keys, MALFORMED_LINKS)), + ('Assets:Checking', 5, build_meta(keys, NOT_FOUND_LINKS)), + ]) + assert not list(hook.run(txn)) + def test_mixed_results(hook): txn = testutil.Transaction( approval='{} {}'.format(*GOOD_LINKS),