def test_balance_assertion(ofx, ledger):
    converter = OfxConverter(account=ofx.account,
                             name="Assets:Foo",
                             ledger=ledger)
    assert (clean_posting(converter.format_balance(
        ofx.account.statement)) == """2013/05/25 * --Autosync Balance Assertion
  Assets:Foo  $0.00 = $100.99
""")
    def test_balance_assertion(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_balance(ofx.account.statement),
"""2013/05/25 * --Autosync Balance Assertion
  Assets:Foo  $0.00 = $100.99
""")
    def test_balance_assertion(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_balance(
                ofx.account.statement),
            """2013/05/25 * --Autosync Balance Assertion
  Assets:Foo  $0.00 = $100.99
""")