def test_007_api_jingdong_verify_500qrcode(self): """ Time :2019-09-16 author : 罗林 desc :验证二维码是否已扫描,并获取信息,返回500 """ rs1 = JdAction.test_api_jingdong_verifyqrcode(reqid=reqid, token=token) Assertion.verity(json.loads(rs1)['code'], 500) Assertion.verity(json.loads(rs1)['m'], '系统错误,请重试') Assertion.verity(json.loads(rs1)['s'], 0)
def test_017_api_jingdong_verify_qrcode_token_is_null(self): """ Time :2019-09-16 author : 闫红 desc :验证二维码是否已扫描,token为空 """ rs1 = JdAction.test_api_jingdong_verifyqrcode(reqid=reqid, token='') Assertion.verity(json.loads(rs1)['code'], 403) Assertion.verity(json.loads(rs1)['m'], 'token不能为空') Assertion.verity(json.loads(rs1)['s'], 0)
def test_018_api_jingdong_verify_qrcode_all_is_null(self): """ Time :2019-09-16 author : 闫红 desc :验证二维码是否已扫描,reqid/token均为空 """ rs1 = JdAction.test_api_jingdong_verifyqrcode(reqid='', token='') Assertion.verity(json.loads(rs1)['code'], 403) Assertion.verity(json.loads(rs1)['m'], 'reqId不能为空') Assertion.verity(json.loads(rs1)['s'], 0)
def test_013_api_jingdong_verify_302qrcode(self): """ Time :2019-09-16 author : 闫红 desc :验证二维码是否已扫描,并获取信息,返回302 """ rs1 = JdAction.test_api_jingdong_verifyqrcode(reqid=reqid, token=token) Assertion.verity(json.loads(rs1)['code'], 302) Assertion.verity(json.loads(rs1)['m'], '需要短信验证') Assertion.verity(json.loads(rs1)['s'], 0)
def test_012_api_jingdong_verify_200qrcode(self): """ Time :2019-09-16 author : 闫红 desc :验证二维码是否已扫描,并获取信息,返回200 """ rs1 = JdAction.test_api_jingdong_verifyqrcode(reqid=reqid, token=token) Assertion.verity(json.loads(rs1)['code'], 200) Assertion.verity(json.loads(rs1)['m'], '授权成功') Assertion.verity(json.loads(rs1)['s'], 1)
def test_009_api_jingdong_verify_301qrcode(self): """ Time :2019-09-16 author : 罗林 desc :验证二维码是否已扫描,并获取信息,返回301 """ rs1 = JdAction.test_api_jingdong_verifyqrcode(reqid=reqid, token=token) Assertion.verity(json.loads(rs1)['code'], 301) Assertion.verity(json.loads(rs1)['m'], '二维码已失效') Assertion.verity(json.loads(rs1)['s'], 0)
def test_015_api_jingdong_verify_qrcode_reqid_error(self): """ Time :2019-09-16 author : 闫红 desc :验证二维码是否已扫描,reqid错误 """ rs1 = JdAction.test_api_jingdong_verifyqrcode(reqid=reqid + '1', token=token) Assertion.verity(json.loads(rs1)['code'], 400) Assertion.verity(json.loads(rs1)['m'], '不存在该会话id') Assertion.verity(json.loads(rs1)['s'], 0)
def test_014_api_jingdong_verify_qrcode_token_error(self): """ Time :2019-09-16 author : 闫红 desc :验证二维码是否已扫描,token错误 """ rs1 = JdAction.test_api_jingdong_verifyqrcode(reqid=reqid, token=token + '1') Assertion.verity(json.loads(rs1)['code'], 501) Assertion.verity(json.loads(rs1)['m'], 'token错误') Assertion.verity(json.loads(rs1)['s'], 0)