Esempio n. 1
0
def testchangepwdexcel(xlsfile=xlsfile1):
    printtitle('START CHANGPWD')
    
    book = xlrd.open_workbook(xlsfile)
    api_sheet = book.sheet_by_index(0)
    nrows = api_sheet.nrows
    
    for i in range(1,nrows):
        uid = api_sheet.cell_value(i,0)   # 分别迭代表格中的client_id,password,sign和ex_code
        #print mobile
        token = api_sheet.cell_value(i,1)
        #print password
        secretkey = api_sheet.cell_value(i,2)
        oldpwd=api_sheet.cell_value(i,3)
        newpwd=api_sheet.cell_value(i,4)
        ex_code = api_sheet.cell_value(i,5)
        #print ex_code
        ex_message=api_sheet.cell_value(i,6)
        #print ex_message
        #print newpwd
        
        datatemp={'uid':uid,'oldpwd':oldpwd,'newpwd':newpwd,\
               'token':token,'secretkey':secretkey}
        #print data1
        url='/user/changepwd'
        testcodework(datatemp, url, ex_code)
Esempio n. 2
0
def testorderlistexcel(xlsfile=xlsfile1):
    printtitle('START testorderlistexcel')
    
    book = xlrd.open_workbook(xlsfile)
    api_sheet = book.sheet_by_index(0)
    nrows = api_sheet.nrows
    
    for i in range(1,nrows):
        
        uid = api_sheet.cell_value(i,0)   # 分别迭代表格中的client_id,password,sign和ex_code
        token = api_sheet.cell_value(i,1)
        secretkey = api_sheet.cell_value(i,2)      
        orderType=api_sheet.cell_value(i,3)        #租车订单数字ID
        offset=api_sheet.cell_value(i,4)
        
        ex_code = api_sheet.cell_value(i,5)
        #print ex_code
        ex_message=api_sheet.cell_value(i,6)
        #print ex_message
        #print newpwd
        
        datatemp={'uid':uid,'orderType':orderType,'offset':offset,\
               'token':token,'secretkey':secretkey}
        #print data1
        url='/order/list'
        
        testcodework(datatemp, url, ex_code)
def testordercancheexcel(xlsfile=xlsfile1):
    printtitle('START testordercancheexcel')
    
    book = xlrd.open_workbook(xlsfile)
    api_sheet = book.sheet_by_index(0)
    nrows = api_sheet.nrows
    
    for i in range(1,nrows):
        uid = api_sheet.cell_value(i,0)   # 分别迭代表格中的client_id,password,sign和ex_code
        #print mobile
        token = api_sheet.cell_value(i,1)
        #print password
        secretkey = api_sheet.cell_value(i,2)
        id=api_sheet.cell_value(i,3)        #租车订单数字ID
        ex_code = api_sheet.cell_value(i,4)
        #print ex_code
        ex_message=api_sheet.cell_value(i,5)
        #print ex_message
        #print newpwd
        
        datatemp={'uid':uid,'id':id,\
               'token':token,'secretkey':secretkey}
        #print data1
        url='/order/canclecheck'
        
        testcodework(datatemp, url, ex_code)
Esempio n. 4
0
def testwaldaybookexcel(xlsfile=xlsfile1):
    
    printtitle('START testwaldaybookexcel')
    
    book = xlrd.open_workbook(xlsfile)
    api_sheet = book.sheet_by_index(0)
    nrows = api_sheet.nrows
    ncols=api_sheet.ncols
    print ncols
    
    for i in range(1,nrows):
        uid = api_sheet.cell_value(i,0)   # 分别迭代表格中的client_id,password,sign和ex_code
        #print mobile
        token = api_sheet.cell_value(i,1)
        #print password
        secretkey = api_sheet.cell_value(i,2)
        offset=api_sheet.cell_value(i,3)
        ex_code = api_sheet.cell_value(i,4)
        ex_message=api_sheet.cell_value(i,5)
        #print ex_message
        
        datatemp={'uid':uid,'token':token,'secretkey':secretkey,'offset':offset}
        
        #print data1
        url='/wallet/daybook'
        testcodework(datatemp, url, ex_code)
Esempio n. 5
0
def testordercancleexcel(xlsfile=xlsfile1):
    printtitle("START ordercancle")

    book = xlrd.open_workbook(xlsfile)
    api_sheet = book.sheet_by_index(0)
    nrows = api_sheet.nrows

    for i in range(1, nrows):
        uid = api_sheet.cell_value(i, 0)  # 分别迭代表格中的client_id,password,sign和ex_code
        # print mobile
        token = api_sheet.cell_value(i, 1)
        # print password
        secretkey = api_sheet.cell_value(i, 2)
        id = api_sheet.cell_value(i, 3)  # 租车订单数字ID

        ex_code = api_sheet.cell_value(i, 4)
        # print ex_code
        ex_message = api_sheet.cell_value(i, 5)
        # print ex_message
        # print newpwd

        datatemp = {"uid": uid, "id": id, "token": token, "secretkey": secretkey}
        # print data1
        url = "/order/cancle"

        testcodework(datatemp, url, ex_code)
def testchangepwdexcel(xlsfile=xlsfile1):
    printtitle('START CHANGPWD')
    
    book = xlrd.open_workbook(xlsfile)
    api_sheet = book.sheet_by_index(0)
    nrows = api_sheet.nrows
    
    for i in range(1,nrows):
        latitude = api_sheet.cell_value(i,0)   # 分别迭代表格中的client_id,password,sign和ex_code
        #print mobile
        longitude = api_sheet.cell_value(i,1)
        #print password
        distance = api_sheet.cell_value(i,2)
        secretkey=api_sheet.cell_value(i,3)
        ex_code = api_sheet.cell_value(i,4)
        #print ex_code
        ex_message=api_sheet.cell_value(i,5)
        #print ex_message
        #print newpwd
        
        datatemp={'latitude':latitude,'longitude':longitude,'distance':distance,\
                  'secretkey':secretkey}
        #print data1
        url='/station/nearbydistance'
        testcodework(datatemp, url, ex_code)
Esempio n. 7
0
def testinvoidelexcel(xlsfile=xlsfile1):
    
    printtitle('START TESTlogout')
    
    book = xlrd.open_workbook(xlsfile)
    api_sheet = book.sheet_by_index(0)
    nrows = api_sheet.nrows
    
    for i in range(1,nrows):
        uid = api_sheet.cell_value(i,0)   # 分别迭代表格中的client_id,password,sign和ex_code
        #print mobile
        token = api_sheet.cell_value(i,1)
        #print password
        secretkey = api_sheet.cell_value(i,2)
        invoiceTitleId=api_sheet.cell_value(i,3)
        
        ex_code = api_sheet.cell_value(i,4)
        #print ex_code
        ex_message=api_sheet.cell_value(i,5)
        #print ex_message
        
        datatemp={'uid':uid,'token':token,'secretkey':secretkey,'invoiceTitleId':invoiceTitleId}
        
        #print data1
        url='/invoice/deltitle'
        testcodework(datatemp, url, ex_code)
Esempio n. 8
0
def testchangepwdexcel(xlsfile=xlsfile1):
    printtitle('START CHANGPWD')
    
    book = xlrd.open_workbook(xlsfile)
    api_sheet = book.sheet_by_index(0)
    nrows = api_sheet.nrows
    
    for i in range(1,nrows):
        uid = api_sheet.cell_value(i,0)   # �ֱ��������е�client_id��password��sign��ex_code
        #print mobile
        token = api_sheet.cell_value(i,1)
        #print password
        secretkey = api_sheet.cell_value(i,2)
        carId=api_sheet.cell_value(i,3)
        type = api_sheet.cell_value(i,4)
        latitude=api_sheet.cell_value(i,5)
        longitude=api_sheet.cell_value(i,6)
        
        ex_code=api_sheet.cell_value(i,7)
        ex_message=api_sheet.cell_value(i,8)
        #print ex_message
        #print newpwd
        
        datatemp={'latitude':latitude,'longitude':longitude,'uid':uid,'token':token,'secretkey':secretkey,\
                  'type':type,'carId':carId}
        #print data1
        url='/car/control'
        testcodework(datatemp, url, ex_code)
Esempio n. 9
0
def testloginexcel(xlsfile=xlsfile1):
    
    printtitle('START testlogin')
    book = xlrd.open_workbook(xlsfile)
    api_sheet = book.sheet_by_index(0)
    nrows = api_sheet.nrows
    
    for i in range(1,nrows):
        mobile = api_sheet.cell_value(i,0)   # 分别迭代表格中的client_id,password,sign和ex_code
        #print mobile
        password = api_sheet.cell_value(i,1)
        #print password
        secretkey = api_sheet.cell_value(i,2)
        ex_code = api_sheet.cell_value(i,3)
        #print ex_code
        ex_message=api_sheet.cell_value(i,4)
        #print ex_message
        
        datatemp = {'mobile':mobile,'passwd':password,'secretkey':secretkey}  #三个参数的值作为请求接口时要带上的数据
        url='/user/login'
        
        testcodework(datatemp, url, ex_code)
Esempio n. 10
0
def testmisgetarea(xlsfile=xlsfile1):
    
    printtitle('START testmisgetarea')
    
    book = xlrd.open_workbook(xlsfile)
    api_sheet = book.sheet_by_index(0)
    nrows = api_sheet.nrows
    
    for i in range(1,nrows):
        uid = api_sheet.cell_value(i,0)   # 分别迭代表格中的client_id,password,sign和ex_code
        #print mobile
        token = api_sheet.cell_value(i,1)
        #print password
        secretkey = api_sheet.cell_value(i,2)
        cityId=api_sheet.cell_value(i,3)
        ex_code = api_sheet.cell_value(i,4)
        ex_message=api_sheet.cell_value(i,5)
        #print ex_message
        
        datatemp={'uid':uid,'token':token,'secretkey':secretkey,'cityId':cityId}
        
        #print data1
        url='/mis/getareas'
        testcodework(datatemp, url, ex_code)