Pytest RuntimeError: no se encontró ninguna aplicación. Trabaje dentro de una función de vista o presione un contexto de aplicación
#Push an application context when running db.create_all()
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'My connection string'
db.init_app(app)
# Add the with statement below to encapsulate db.create_all()
with app.app_context():
db.create_all()
Jittery Jay