@@ -100,6 +100,18 @@ def test_bad_post_links(hook):
actual = {error.message for error in hook.run(txn)}
assert expected == actual
@pytest.mark.parametrize('value', testutil.NON_STRING_METADATA_VALUES)
def test_bad_metadata_type(hook, value):
txn = testutil.Transaction(**{'check': value}, postings=[
('Income:Donations', -5),
('Assets:Cash', 5),
])
expected = {'transaction has wrong type of check: expected str but is a {}'.format(
type(value).__name__,
)}
@pytest.mark.parametrize('ext_doc', [
'rt:123',
'rt:456/789',