Пример #1
0
def db():
    with app.app_context():
        from server.db import db
        db.session.close()
        db.drop_all()
        db.create_all()
        yield db
Пример #2
0
def db():
    with app.app_context():
        from server.db import db
        db.session.close()
        db.drop_all()
        db.create_all()
        yield db
Пример #3
0
def create_db():
    db.drop_all()
    db.create_all()
    db.session.commit()
Пример #4
0
 def tearDown(self):
     """
     Deletes created tables and closes the session instance
     """
     db.session.remove()
     db.drop_all(app=app)
Пример #5
0
def drop_db():
	db.drop_all()
Пример #6
0
def drop_db():
    db.drop_all()