def test_006_api_jingdong_getqrcode_all_none(self): """ Time :2019-06-19 author : 罗林 desc :获取二维码 """ rs1 = JdAction.test_api_jingdong_getqrcode(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_003_api_jingdong_get_200qrcode(self): """ Time :2019-06-19 author : 罗林 desc :获取二维码,返回200 """ rs1 = JdAction.test_api_jingdong_getqrcode(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_002_api_jingdong_get_502qrcode(self): """ Time :2019-06-19 author : 罗林 desc :获取二维码,返回502 """ rs1 = JdAction.test_api_jingdong_getqrcode(reqid=reqid, token=token) Assertion.verity(json.loads(rs1)['code'], 502) Assertion.verity(json.loads(rs1)['m'], '系统繁忙,请稍后再试') Assertion.verity(json.loads(rs1)['s'], 0)
def test_004_api_jingdong_getqrcode_token_error(self): """ Time :2019-06-19 author : 罗林 desc :获取二维码 """ rs1 = JdAction.test_api_jingdong_getqrcode(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)