def register(db): # 连接 global connent connent = DbOp.connent(db) yield # 断开 DbOp.disconnect(connent)
def register(setup_data, url, baserequests, db): connent = DbOp.connent(db) # 注册 phone = setup_data['casedata']['mobilephone'] DbOp.deleteUser(connent, phone) Member.register(url, baserequests, setup_data['casedata']) yield # 删除 DbOp.deleteUser(connent, phone) DbOp.disconnect(connent)