def app(): """An application for the tests.""" _app = create_app(TestConfig) with _app.app_context(): _db.create_all() ctx = _app.test_request_context() ctx.push() yield _app ctx.pop()
def test_production_config(): """Production config.""" app = create_app(ProdConfig) assert app.config['ENV'] == 'prod' assert not app.config['DEBUG']
def test_dev_config(): """Development config.""" app = create_app(DevConfig) assert app.config['ENV'] == 'dev' assert app.config['DEBUG']
# -*- coding: utf-8 -*- """Create an application instance.""" from flask.helpers import get_debug_flag from remixvr.app import create_app from remixvr.settings import DevConfig, ProdConfig CONFIG = DevConfig if get_debug_flag() else ProdConfig app = create_app(CONFIG)