Exemple #1
0
    def test_later_non_transaction_date(self):
        """later non-transaction things inherit preceding thing date"""
        testdata = '''2013/05/06 payee name
    expenses: misc
    liabilities: credit card  $-1
2013/05/07 payee name
    expenses: misc
    liabilities: credit card  $-2
'''
        tempfile = FileTester.create_temp_file(testdata)
        ledgerfile = LedgerFile(tempfile)
        ledgerfile._add_thing_from_lines(
            ['; blah blah blah', '; and so on...']
        )
        # non-transaction dates are only populated with sort
        ledgerfile.sort()
        remove(tempfile)
        self.assertEqual(
            ledgerfile.get_things()[1].thing_date,
            ledgerfile.get_things()[2].thing_date
        )