def test_initial_balance(self): ofx = OfxParser.parse(file(os.path.join('fixtures', 'checking.ofx'))) ledger = Ledger(os.path.join('fixtures', 'checking.lgr')) converter = OfxConverter(ofx=ofx, name="Assets:Foo", ledger=ledger) self.assertEqualLedgerPosting(converter.format_initial_balance(ofx.account.statement), """2000/01/01 * --Autosync Initial Balance Assets:Foo $160.49 ; ofxid: 1101.1452687~7.autosync_initial Assets:Equity -$160.49 """)
def test_initial_balance(ofx, ledger): converter = OfxConverter(account=ofx.account, name="Assets:Foo", ledger=ledger) assert (clean_posting( converter.format_initial_balance(ofx.account.statement)) == """2000/01/01 * --Autosync Initial Balance Assets:Foo $160.49 ; ofxid: 1101.1452687~7.autosync_initial Assets:Equity -$160.49 """)
def test_initial_balance(self): ofx = OfxParser.parse(open(os.path.join('fixtures', 'checking.ofx'))) ledger = Ledger(os.path.join('fixtures', 'checking.lgr')) converter = OfxConverter( account=ofx.account, name="Assets:Foo", ledger=ledger) self.assertEqualLedgerPosting( converter.format_initial_balance( ofx.account.statement), """2000/01/01 * --Autosync Initial Balance Assets:Foo $160.49 ; ofxid: 1101.1452687~7.autosync_initial Assets:Equity -$160.49 """)