From af923db7a19908a8c8eeedf36cbe0428a16e1485 Mon Sep 17 00:00:00 2001 From: jeff levesque Date: Fri, 29 Jul 2016 10:59:15 -0400 Subject: [PATCH] #2628: app.py, add 'elif' for 'run' condition --- app.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 63029f6fc..00513325b 100644 --- a/app.py +++ b/app.py @@ -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()