def db_corner(app_corner): db.app = app_corner with app_corner.app_context(): db.create_all('__all__', app_corner) yield db db.session.remove() db.drop_all()
def initdb(): db.drop_all() db.create_all()
def drop_db(): with app.test_request_context(): db.drop_all()
def tearDown(self): with self.get_context(): db.drop_all()
def dropall(): if prompt_bool("Are you sure ? You will lose all your data !"): db.drop_all()
def initdb(): app = make_application() db.app = app db.drop_all() db.create_all() logger.info("Database reseted")
def run(self): db.drop_all()
def drop_db(): '''drop database''' db.drop_all() print 'Drop database success.'
def drop_all(): db.drop_all()