示例#1
0
def register(db):
    # 连接
    global connent
    connent = DbOp.connent(db)
    yield
    # 断开
    DbOp.disconnect(connent)
示例#2
0
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)