Skip to content

Commit

Permalink
Fix unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kraymer committed Oct 23, 2016
1 parent 5dc3f69 commit 9168f16
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions qifqif/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,16 +248,14 @@ def parse_args(argv):
dest_group.add_argument('-o', '--output', dest='dest',
help=('output filename. DEFAULT: edit input file in-place'),
default='')
parser.add_argument("-f", "--force", action="count", default=0,
parser.add_argument("-f", "--force", action="count",
help=("discard transactions categories if not present in "
"configuration file. Repeat the flag (-ff) to force editing of "
"all transactions."))

parser.add_argument('-v', '--version', action='version',
version='%(prog)s ' + __version__,
help='display version information and exit')
args = vars(parser.parse_args(args=argv[1:]))

if not args['dest']:
args['dest'] = args['src']
return args
Expand Down
2 changes: 1 addition & 1 deletion test/mock_inputs_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

OUT_FILE = tempfile.NamedTemporaryFile()

OPTIONS = {'dry-run': True, 'config': testdata.CFG_FILE}
OPTIONS = {'dry-run': True, 'force': False, 'config': testdata.CFG_FILE}

KEYBOARD_BASE = [
'Y', # Edit 'Bars' category [y,N] ?
Expand Down
2 changes: 1 addition & 1 deletion test/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from qifqif import qifile
import testdata

OPTIONS = {'dry-run': True, 'config': testdata.CFG_FILE}
OPTIONS = {'dry-run': True, 'force': False, 'config': testdata.CFG_FILE}


def mock_input_default(prompt, choices='', vanish=False):
Expand Down

0 comments on commit 9168f16

Please sign in to comment.