def app(request): """Build an application""" app = create_app('testing') ctx = app.app_context() ctx.push() request.addfinalizer(ctx.pop) return app