@@ -20,26 +20,26 @@ import pytest
from . import testutil
from conservancy_beancount import data
def test_typical_opening():
txn = testutil.Transaction.opening_balance()
txn = testutil.OpeningBalance()
assert data.is_opening_balance_txn(txn)
def test_multiacct_opening():
txn = testutil.Transaction(postings=[
('Assets:Receivable:Accounts', 100),
(next(testutil.OPENING_EQUITY_ACCOUNTS), -100),
('Liabilities:Payable:Accounts', -150),
(next(testutil.OPENING_EQUITY_ACCOUNTS), 150),
])
def test_opening_with_fx():
equity_post = txn.postings[-1]
txn.postings[-1] = equity_post._replace(
units=testutil.Amount(equity_post.units.number * Decimal('.9'), 'EUR'),
cost=testutil.Cost('1.11111'),
)