def test_app_no_environment(): with patch('bas_web_map_inventory._create_app_config' ) as mock_create_app_config: config = Config() mock_create_app_config.return_value = config app = create_app() assert app is not None assert isinstance(app, Flask) assert app.config['TESTING'] is False
def test_app_enable_sentry(): with patch('bas_web_map_inventory._create_app_config' ) as mock_create_app_config: config = _TestingConfig() config.APP_ENABLE_SENTRY = True mock_create_app_config.return_value = config app = create_app() assert app is not None assert isinstance(app, Flask) assert app.config['TESTING'] is True assert app.config['APP_ENABLE_SENTRY'] is True
from bas_web_map_inventory import create_app app = create_app()
def app(): app = create_app() return app