test_meta_invoice: Add explicit "missing invoice" tests.
I wrote this while debugging something else, and I don't want to let a good test go to waste.
This commit is contained in:
parent
600c9d9d6f
commit
0d80c2282c
1 changed files with 12 additions and 0 deletions
|
@ -127,3 +127,15 @@ def test_bad_type_values_on_transaction(hook, acct1, acct2, value):
|
|||
)
|
||||
actual = {error.message for error in hook.run(txn)}
|
||||
assert actual == {expected_msg}
|
||||
|
||||
@pytest.mark.parametrize('acct1,acct2', testutil.combine_values(
|
||||
REQUIRED_ACCOUNTS,
|
||||
NON_REQUIRED_ACCOUNTS,
|
||||
))
|
||||
def test_missing_invoice(hook, acct1, acct2):
|
||||
txn = testutil.Transaction(postings=[
|
||||
(acct2, -25),
|
||||
(acct1, 25),
|
||||
])
|
||||
actual = {error.message for error in hook.run(txn)}
|
||||
assert actual == {"{} missing {}".format(acct1, TEST_KEY)}
|
||||
|
|
Loading…
Reference in a new issue