def tearDown(self): db.session.rollback() db.session.close() db.drop_all() # stall here implies connection leak db.session.remove() db.get_engine(self.app).dispose()
def setUp(self): db.get_engine(self.app).dispose() db.create_all() db.session.begin_nested()
def tearDown(self): db.session.rollback() db.drop_all() db.session.remove() db.get_engine(self.app).dispose()