예제 #1
0
def test_budgets_children(budgets_doc):
    """
    2017-01-01 custom "budget" Expenses:Books "daily" 10.00 USD
    2017-01-01 custom "budget" Expenses:Books:Notebooks "daily" 2.00 USD"""

    assert calculate_budget_children(budgets_doc, 'Expenses', date(2017, 1, 1),
                                     date(2017, 1, 2))['USD'] == D('12.00')

    assert calculate_budget_children(budgets_doc, 'Expenses:Books',
                                     date(2017, 1, 1),
                                     date(2017, 1, 2))['USD'] == D('12.00')

    assert calculate_budget_children(budgets_doc, 'Expenses:Books:Notebooks',
                                     date(2017, 1, 1),
                                     date(2017, 1, 2))['USD'] == D('2.00')
예제 #2
0
def test_budgets_children(budgets_doc):
    """
    2017-01-01 custom "budget" Expenses:Books "daily" 10.00 USD
    2017-01-01 custom "budget" Expenses:Books:Notebooks "daily" 2.00 USD"""

    assert calculate_budget_children(budgets_doc, 'Expenses', date(2017, 1, 1),
                                     date(2017, 1, 2))['USD'] == D('12.00')

    assert calculate_budget_children(budgets_doc, 'Expenses:Books',
                                     date(2017, 1, 1),
                                     date(2017, 1, 2))['USD'] == D('12.00')

    assert calculate_budget_children(budgets_doc, 'Expenses:Books:Notebooks',
                                     date(2017, 1, 1),
                                     date(2017, 1, 2))['USD'] == D('2.00')
예제 #3
0
def test_budgets_children(budgets_doc):
    """
    2017-01-01 custom "budget" Expenses:Books "daily" 10.00 USD
    2017-01-01 custom "budget" Expenses:Books:Notebooks "daily" 2.00 USD"""

    assert calculate_budget_children(budgets_doc, "Expenses", date(2017, 1, 1),
                                     date(2017, 1, 2))["USD"] == D("12.00")

    assert calculate_budget_children(budgets_doc, "Expenses:Books",
                                     date(2017, 1, 1),
                                     date(2017, 1, 2))["USD"] == D("12.00")

    assert (calculate_budget_children(
        budgets_doc,
        "Expenses:Books:Notebooks",
        date(2017, 1, 1),
        date(2017, 1, 2),
    )["USD"] == D("2.00"))