예제 #1
0
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()
예제 #2
0
 def tearDown(self):
     db.session.remove()
     db.drop_all()
예제 #3
0
 def tearDown(self):
     db.session.remove()
     db.drop_all()
예제 #4
0
 def teardown():
     db.session.remove()
     db.drop_all()
예제 #5
0
def db(app):
    _db.create_all()

    yield _db

    _db.drop_all()
예제 #6
0
 def tearDown(self):
     db.session.remove()
     db.drop_all()
     self.app_context.pop()
예제 #7
0
 def teardown():
     db.session.remove()
     db.drop_all()