Example #1
0
 def test_dump_to_buffer(self):
     transactions, lines = testdata.transactions()
     res = qifqif.dump_to_buffer(transactions)
     self.assertEqual(res, ''.join(lines))
Example #2
0
 def test_audit_mode_no_edit(self, mock_quick_input):
     OPTIONS['audit'] = True
     res = qifqif.process_file(testdata.transactions()[0], OPTIONS)
     self.assertEqual(len(res), 2)
     self.assertEqual(res[0]['category'], 'Bars')
Example #3
0
 def test_audit_mode_no_edit(self, mock_quick_input):
     OPTIONS["audit"] = True
     res = qifqif.process_transactions(testdata.transactions()[0], OPTIONS)
     self.assertEqual(len(res), 2)
     self.assertEqual(res[0]["category"], "Bars")
Example #4
0
 def test_dump_to_buffer(self):
     transactions, lines = testdata.transactions()
     res = qifile.dump_to_buffer(transactions)
     self.assertEqual(res, "".join(lines))
Example #5
0
 def test_audit_mode(self, mock_quick_input):
     OPTIONS['audit'] = True
     res = qifqif.process_transactions(testdata.transactions()[0], OPTIONS)
     self.assertEqual(len(res), 2)
     self.assertEqual(res[0]['category'], 'Drink')
Example #6
0
 def test_query_guru_ruler(self, mock_quick_input):
     t, _ = testdata.transactions()
     res = qifqif.query_guru_ruler(t[0])
     self.assertEqual(res, {'date': r'\d\d/02/2014', 'memo': 'houf'})
Example #7
0
 def test_query_guru_ruler(self, mock_quick_input):
     t, _ = testdata.transactions()
     res = qifqif.query_guru_ruler(t[0])
     self.assertEqual(res, {"date": r"\d\d/02/2014", "memo": "houf"})