def _make_app(request, config): """Create an application for the given config name.""" app = create_app(config) # Establish an application context before running the tests. This allows the use of # Flask-SQLAlchemy in the test setup. ctx = app.app_context() ctx.push() def teardown(): ctx.pop() request.addfinalizer(teardown) return app
# SPDX-License-Identifier: GPL-3.0-or-later from cachito.web.app import create_app app = create_app()