@@ -179,12 +179,24 @@ def test_line1_not_custom_payee():
"",
"2015/03/14 VV",
" Accrued:Accounts Receivable 15.00 USD",
" Income:Donations -15.00 USD",
]
def test_custom_date_missing():
render_vars = template_vars('YY', '20.00')
with pytest.raises(errors.UserInputConfigurationError):
render_lines(render_vars, 'Custom Payee')
def test_custom_date_is_none():
render_vars = template_vars('YZ', '25.00', other_vars={
'custom_date': None,
})
@pytest.mark.parametrize('amount,expect_fee', [
(40, 3),
(80, 6),
])
def test_conditional(amount, expect_fee):
expect_cash = amount - expect_fee