def tearDown(self): with self.app.app_context(): db.session.remove() db.drop_all()
def tearDown(self): '''用于清理数据,把数据库清理掉''' with self.app.app_context(): db.session.remove() db.drop_all()