def createdb(): "Inititalise the database" from webapp.models import db var = input("Drop database [N/y]: ") if var.lower() == "y": db.drop_all() db.create_all() db.session.commit()
def tearDown(self): db.session.remove() db.drop_all()
def teardown(): db.session.remove() db.drop_all()
def db(app): _db.create_all() yield _db _db.drop_all()
def tearDown(self): db.session.remove() db.drop_all() self.app_context.pop()