Skip to content

Commit

Permalink
improve coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Kraymer committed Jun 4, 2015
1 parent 3e609e6 commit 5b1fe23
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 0 additions & 4 deletions qifqif/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ def query_match(cached_match, payee):
return match


def query_save():
return quick_input('---\nSave', 'yn') == 'Y'


def process_transaction(t, cached_tag, cached_match, options={}):
print('Amount..: %s' % (term.green(str(t['amount'])) if
(t['amount'] and float(t['amount']) > 0)
Expand Down
5 changes: 5 additions & 0 deletions test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ def setUp(self):
self.transactions = qifqif.parse_file(TEST_DATA['t02']['raw'],
{'batch': True})

@patch('qifqif.quick_input', side_effect=mock_input_default)
def test_parse_file_continue(self, mock_quick_input):
transactions = qifqif.parse_file(TEST_DATA['t02']['raw'])
self.assertEqual(len(transactions), 2)

def test_process_file(self):
res = qifqif.process_file(self.transactions, {'config': CONFIG_FILE})
self.assertEqual(len(res), 2)
Expand Down

0 comments on commit 5b1fe23

Please sign in to comment.