Skip to content

Commit

Permalink
#2628: app.py, add 'elif' for 'run' condition
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff1evesque committed Jul 29, 2016
1 parent 2a98470 commit af923db
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions app.py
Expand Up @@ -16,8 +16,16 @@
from factory import create_app

# run unit test
if len(sys.argv) > 1 and sys.argv[1] == 'test':
pytest.main(['-x', 'test'])
if len(sys.argv) > 1:
if sys.argv[1] == 'test':
pytest.main(['-x', 'test'])
elif sys.argv[1] == 'run':
args = {
'prefix': 'test',
'settings': ''
}
app = create_app(args)
app.run(host='0.0.0.0')
# run application
else:
app = create_app()
Expand Down

0 comments on commit af923db

Please sign in to comment.