tests: Add template test for 9f72052
.
This commit is contained in:
parent
52f2bdcd0e
commit
f6599a3deb
2 changed files with 21 additions and 0 deletions
|
@ -32,3 +32,11 @@ template =
|
|||
template = {custom_date} {payee} - Custom
|
||||
Accrued:Accounts Receivable {amount}
|
||||
Income:Donations -{amount}
|
||||
|
||||
[Multisplit]
|
||||
template =
|
||||
Assets:Cash {amount}
|
||||
Income:Sales -{amount} + {item_sales}
|
||||
; :NonItem:
|
||||
Income:Sales -{item_sales}
|
||||
; :Item:
|
||||
|
|
|
@ -126,6 +126,19 @@ def test_zeroed_account_skipped():
|
|||
" Income:Donations -99.00 USD",
|
||||
]
|
||||
|
||||
def test_zeroed_account_last():
|
||||
render_vars = template_vars('JJ', '90.00', other_vars={
|
||||
'item_sales': decimal.Decimal(0),
|
||||
})
|
||||
lines = render_lines(render_vars, 'Multisplit')
|
||||
assert lines == [
|
||||
"",
|
||||
"2015/03/14 JJ",
|
||||
" Assets:Cash 90.00 USD",
|
||||
" Income:Sales -90.00 USD",
|
||||
" ; :NonItem:",
|
||||
]
|
||||
|
||||
def test_custom_payee_line():
|
||||
render_vars = template_vars('ZZ', '10.00', other_vars={
|
||||
'custom_date': datetime.date(2014, 2, 13),
|
||||
|
|
Loading…
Reference in a new issue