File diff 44762555d5eb → 8755d6af6700
tests/test_hook_ledger_entry.py
Show inline comments
...
 
@@ -182,6 +182,23 @@ def test_line1_not_custom_payee():
 
        "  Income:Donations  -15.00 USD",
 
    ]
 

	
 
@pytest.mark.parametrize('amount,expect_fee', [
 
    (40, 3),
 
    (80, 6),
 
])
 
def test_conditional(amount, expect_fee):
 
    expect_cash = amount - expect_fee
 
    amount_s = '{:.02f}'.format(amount)
 
    render_vars = template_vars('Buyer', amount_s)
 
    lines = render_lines(render_vars, 'Conditional')
 
    assert lines == [
 
        "",
 
        "2015/03/14 Buyer",
 
        "  Assets:Cash  {:.02f} USD".format(expect_cash),
 
        "  Expenses:Banking Fees  {:.02f} USD".format(expect_fee),
 
        "  Income:Sales  -{} USD".format(amount_s),
 
    ]
 

	
 
@pytest.mark.parametrize('amount_expr', [
 
    '',
 
    'name',