コード例 #1
0
ファイル: test_trx_import.py プロジェクト: reinbach/finance
    def test_get_account(self):
        """Test getting a valid account"""
        trx = {
            'summary': 'Interest Expense',
            'amount': '10.00',
            'date': '02/19/2013'
        }
        trx_import = TransactionsImport(self.accounts['bank'].account_id,
                                        self.filename)

        res = trx_import.get_account(trx['summary'])
        assert self.accounts['expense'].account_id == res

        trx = {
            'summary': 'Interest Income',
            'amount': '-5.00',
            'date': '02/19/2013'
        }
        res = trx_import.get_account(trx['summary'])
        assert self.accounts['income'].account_id == res
コード例 #2
0
ファイル: test_trx_import.py プロジェクト: reinbach/finance
 def test_get_account_none(self):
     """Test getting non existant account"""
     trx = {
         'summary': 'Salary',
         'amount': '10.00',
         'date': '02/19/2013'
     }
     trx_import = TransactionsImport(self.accounts['bank'].account_id,
                                     self.filename)
     res = trx_import.get_account(trx['summary'])
     assert res is None