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(self, mock_quick_input): res = qifqif.process_file(self.transactions, {'config': CONFIG_FILE, 'audit': True, 'dry-run': True}) self.assertEqual(len(res), 3) self.assertEqual(res[1]['category'], 'Drink')
def test_sigint(self, mock_quick_input): """Check that processed transactions are not lost on interruption. """ res = qifqif.process_file(self.transactions, {'config': CONFIG_FILE, 'audit': True, 'dry-run': True}) self.assertEqual(res[1]['category'], 'Drink')
def test_audit_mode_no_edit(self, mock_quick_input): res = qifqif.process_file(self.transactions, {'config': CONFIG_TEST_FILE, 'audit': True}) self.assertEqual(len(res), 3) self.assertEqual(res[1]['category'], 'Bars')