File tree 3 files changed +4
-5
lines changed
3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,7 @@ def create_app():
15
15
# Se incializa la conexión entre SQLALchemy y la base de datos
16
16
db .init_app (app )
17
17
18
- @app .before_first_request
19
- def crea_bases ():
18
+ with app .app_context ():
20
19
'''Función encargada de verificar que exista una base de datos con
21
20
las tablas de alumnos y de usuarios pobladas correctamente.
22
21
En caso de no existir, es creada'''
Original file line number Diff line number Diff line change 11
11
def base_conectada ():
12
12
print ("Conectando a base de datos..." )
13
13
with app .app_context () as conectada :
14
- db .init_app (app )
14
+ # db.init_app(app)
15
15
yield conectada
16
16
17
17
Original file line number Diff line number Diff line change 9
9
@pytest .fixture
10
10
def client ():
11
11
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)
14
14
yield client
15
15
16
16
You can’t perform that action at this time.
0 commit comments