tests: More tests for positive results for last commit.
This commit is contained in:
parent
8516134687
commit
13c316acf6
1 changed files with 25 additions and 0 deletions
|
@ -182,6 +182,31 @@ def test_line1_not_custom_payee():
|
|||
" Income:Donations -15.00 USD",
|
||||
]
|
||||
|
||||
def test_only_payee_line_date_is_required():
|
||||
render_vars = template_vars('VY', '17.50', other_vars={
|
||||
'custom_date': datetime.date(2014, 2, 11),
|
||||
})
|
||||
del render_vars['date']
|
||||
lines = render_lines(render_vars, 'Custom Payee')
|
||||
assert lines == [
|
||||
"",
|
||||
"2014/02/11 VY - Custom",
|
||||
" Accrued:Accounts Receivable 17.50 USD",
|
||||
" Income:Donations -17.50 USD",
|
||||
]
|
||||
|
||||
def test_dates_can_be_none_except_payee_line_date():
|
||||
render_vars = template_vars('VZ', '18.00', date=None, other_vars={
|
||||
'custom_date': datetime.date(2014, 2, 10),
|
||||
})
|
||||
lines = render_lines(render_vars, 'Custom Payee')
|
||||
assert lines == [
|
||||
"",
|
||||
"2014/02/10 VZ - Custom",
|
||||
" Accrued:Accounts Receivable 18.00 USD",
|
||||
" Income:Donations -18.00 USD",
|
||||
]
|
||||
|
||||
def test_custom_date_missing():
|
||||
render_vars = template_vars('YY', '20.00')
|
||||
with pytest.raises(errors.UserInputConfigurationError):
|
||||
|
|
Loading…
Reference in a new issue