def app(): app = inspire_create_app() app_config = {} app_config["DEBUG"] = False app_config["CELERY_CACHE_BACKEND"] = "memory" app_config["SERVER_NAME"] = "localhost:5000" app_config["CELERY_TASK_ALWAYS_EAGER"] = False app_config["CELERY_TASK_EAGER_PROPAGATES"] = False app_config["TESTING"] = True app.config.update(app_config) with app.app_context(): yield app
def app(): app = inspire_create_app() app_config = {} app_config["DEBUG"] = False app_config["CELERY_CACHE_BACKEND"] = "memory" app_config["CELERY_TASK_ALWAYS_EAGER"] = False app_config["CELERY_TASK_EAGER_PROPAGATES"] = False app_config["TESTING"] = True app_config["SEARCH_INDEX_PREFIX"] = "test-integration-async-" app_config[ "SQLALCHEMY_DATABASE_URI"] = "postgresql+psycopg2://inspirehep:inspirehep@localhost/test-inspirehep-async" app_config["FEATURE_FLAG_ENABLE_REDIRECTION_OF_PIDS"] = True app.wsgi_app.mounts["/api"].config.update(app_config) # We cannot have `api` app with the same SERVER_NAME app_config["SERVER_NAME"] = "localhost:5000" app.config.update(app_config) with app.app_context(): yield app