Пример #1
0
 def test_dump_to_buffer(self):
     transactions, lines = testdata.transactions()
     res = qifqif.dump_to_buffer(transactions)
     self.assertEqual(res, ''.join(lines))
Пример #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')
Пример #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")
Пример #4
0
 def test_dump_to_buffer(self):
     transactions, lines = testdata.transactions()
     res = qifile.dump_to_buffer(transactions)
     self.assertEqual(res, "".join(lines))
Пример #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')
Пример #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'})
Пример #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"})