File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,7 @@ def create_app():
1515 # Se incializa la conexión entre SQLALchemy y la base de datos
1616 db .init_app (app )
1717
18- @app .before_first_request
19- def crea_bases ():
18+ with app .app_context ():
2019 '''Función encargada de verificar que exista una base de datos con
2120 las tablas de alumnos y de usuarios pobladas correctamente.
2221 En caso de no existir, es creada'''
Original file line number Diff line number Diff line change 1111def base_conectada ():
1212 print ("Conectando a base de datos..." )
1313 with app .app_context () as conectada :
14- db .init_app (app )
14+ # db.init_app(app)
1515 yield conectada
1616
1717
Original file line number Diff line number Diff line change 99@pytest .fixture
1010def client ():
1111 with app .test_client () as client :
12- with app .app_context ():
13- db .init_app (app )
12+ # with app.app_context():
13+ # db.init_app(app)
1414 yield client
1515
1616
You can’t perform that action at this time.
0 commit comments