File diff 3d704e2865fe → c88c5ef3b05d
tests/test_reports_accrual.py
Show inline comments
...
 
@@ -212,20 +212,6 @@ def test_accrual_postings_consistent_account(acct_name):
 
    assert related.account == acct_name
 
    assert related.accounts == {acct_name}
 

	
 
@pytest.mark.parametrize('cost', [
 
    testutil.Cost('1.2', 'USD'),
 
    None,
 
])
 
def test_accrual_postings_consistent_cost(cost):
 
    meta = {'invoice': 'FXinvoice.pdf'}
 
    txn = testutil.Transaction(postings=[
 
        (ACCOUNTS[0], 60, 'EUR', cost, meta),
 
        (ACCOUNTS[0], 30, 'EUR', cost, meta),
 
    ])
 
    related = accrual.AccrualPostings(data.Posting.from_txn(txn))
 
    assert related.cost == cost
 
    assert related.costs == {cost}
 

	
 
@pytest.mark.parametrize('meta_key,acct_name', testutil.combine_values(
 
    CONSISTENT_METADATA,
 
    ACCOUNTS,
...
 
@@ -255,20 +241,6 @@ def test_accrual_postings_inconsistent_account():
 
    assert related.account is related.INCONSISTENT
 
    assert related.accounts == set(ACCOUNTS)
 

	
 
def test_accrual_postings_inconsistent_cost():
 
    meta = {'invoice': 'FXinvoice.pdf'}
 
    costs = {
 
        testutil.Cost('1.1', 'USD'),
 
        testutil.Cost('1.2', 'USD'),
 
    }
 
    txn = testutil.Transaction(postings=[
 
        (ACCOUNTS[0], 10, 'EUR', cost, meta)
 
        for cost in costs
 
    ])
 
    related = accrual.AccrualPostings(data.Posting.from_txn(txn))
 
    assert related.cost is related.INCONSISTENT
 
    assert related.costs == costs
 

	
 
@pytest.mark.parametrize('meta_key,acct_name', testutil.combine_values(
 
    CONSISTENT_METADATA,
 
    ACCOUNTS,