def checkRes(d, res): result = "fail" if d["code"]==res["code"]: result = "pass" if d["code"] == "000": pass lib710.logResult(d, result)
def checkRes(d, res): result = "fail" if d["code"]==res["code"]: if d["code"] == "000": if d["gameId"] in ( 10001, 10002, 10003, 20004) and len(res["prizeLevel"]) ==1: if res["prizeLevel"][0]["prizeLevelId"] == 0 and \ len(res["winTicket"]) == 0 and \ res["prizeLevel"][0]["prizeAmount"] == 0: result = "pass" elif res["prizeLevel"][0]["prizeLevelId"] != 0 and \ len(res["winTicket"]) !=0: result = checkAmount(d,res["prizeLevel"][0],res["winTicket"][0]) elif d["gameId"] == 10002 and len(res["prizeLevel"]) > 1: result = "pass" if len(res["winTicket"]) == 0: for pLevel in res["prizeLevel"]: if pLevel["prizeLevelId"]!=0: result = "fail" else: for pLevel in res["prizeLevel"]: if pLevel["prizeLevelId"] == 0: if pLevel["prizeAmount"]!=0: result = "fail" else: for wTicket in res["winTicket"]: if pLevel["betNo"] == wTicket["betNo"]: result = checkAmount(d,pLevel,wTicket) elif d["gameId"] == 20004: pass lib710.logResult(d,result)
def checkRes(d, res): result = "fail" if d["code"]==res["code"]: if d["code"] == "000": if res["drawId"]!=None and res["drawStatus"] == 1: result = "pass" else: result = "pass" lib710.logResult(d, result)
def checkRes(d, res): result = "fail" ## print res if d["code"]==res["code"]: if d["code"] == "000": if d["gameId"] == "10001" or d["gameId"] == "10003": if res["poolId"]==1001 and round(res["poolAmount"],3)==round(lib710.queryPoolAmount(res["poolId"]),3): result = "pass" else: print res["poolAmount"], lib710.queryPoolAmount(res["poolId"]) elif d["gameId"] == "10002": if res["poolId"]==1002 and round(res["poolAmount"],3)==round(lib710.queryPoolAmount(res["poolId"]),3): result = "pass" else: print res["poolAmount"], lib710.queryPoolAmount(res["poolId"]) else: result = "pass" lib710.logResult(d, result)
#!/usr/bin/python import sys import os sys.path.append(os.getcwd()) import lib710 lib710.logResult("aaa","pass")