init_app()
db.app = app
db.create_all(app=app)

@classmethod
def tearDownClass(cls):
    db.drop_all(app=app)

def setUp(self):
    db.session.rollback()
self.trans = db.session.begin(subtransactions=True)

def tearDown(self):
    self.trans.rollback()
db.session.begin()
Flask-SQLAlchemy integration tests can't find a way to rollback changes