Skip to content
This repository has been archived by the owner on Sep 25, 2020. It is now read-only.

Commit

Permalink
Testing no debug
Browse files Browse the repository at this point in the history
  • Loading branch information
euri10 committed Sep 7, 2017
1 parent 7fc4fee commit 8068d16
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/gols/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def main(debug):
logger.info('Debug level set on')
else:
logger.setLevel(level=logging.INFO)
logger.info('Info level set on')


@main.command(short_help='uploads .fit files to your garmin connect account')
Expand Down
7 changes: 7 additions & 0 deletions tests/test_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ def test_debug_turned_on(runner):
assert 'Debug level set on' in str(l)


def test_debug_turned_off(runner):
with LogCapture() as l:
result = runner.invoke(main, ['upload'])
assert result.exit_code == 2
assert 'Info level set on' in str(l)


def test_upload_help(runner):
result = runner.invoke(upload, ['--help'])
assert result.exit_code == 0
Expand Down

0 comments on commit 8068d16

Please sign in to comment.