File diff 4009c626d4cb → 3e21157f205b
tests/test_hook_ledger_entry.py
Show inline comments
...
 
@@ -199,6 +199,21 @@ def test_conditional(amount, expect_fee):
 
        "  Income:Sales  -{} USD".format(amount_s),
 
    ]
 

	
 
def test_string_conditionals():
 
    render_vars = template_vars('MM', '6', other_vars={
 
        'false': '',
 
        'true': 'true',
 
    })
 
    lines = render_lines(render_vars, 'StringConditional')
 
    assert lines == [
 
        "",
 
        "2015/03/14 MM",
 
        "  Income:Sales  -1.00 USD",
 
        "  Income:Sales  -2.00 USD",
 
        "  Income:Sales  -3.00 USD",
 
        "  Assets:Cash  6.00 USD",
 
    ]
 

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