def test_dump_to_buffer(self): transactions, lines = testdata.transactions() res = qifqif.dump_to_buffer(transactions) self.assertEqual(res, ''.join(lines))
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')
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")
def test_dump_to_buffer(self): transactions, lines = testdata.transactions() res = qifile.dump_to_buffer(transactions) self.assertEqual(res, "".join(lines))
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')
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'})
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"})