def test_056_api_jingdong_getcode_reqid_none(self): """ Time :2019-06-19 author : 罗林 desc : 获取短信验证码,reqid为空 """ rs1 = JdAction.test_api_jingdong_getcode(reqid='', token=token) Assertion.verity(json.loads(rs1)['code'], 403) Assertion.verity(json.loads(rs1)['m'], 'reqId不能为空') Assertion.verity(json.loads(rs1)['s'], 0)
def test_058_api_jingdong_getcode_token_none(self): """ Time :2019-06-19 author : 罗林 desc : 获取短信验证码,token为空 """ rs1 = JdAction.test_api_jingdong_getcode(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_054_api_jingdong_302getcode(self): """ Time :2019-09-17 author : 闫红 desc : 获取短信验证码,返回302 """ rs1 = JdAction.test_api_jingdong_getcode(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_053_api_jingdong_301getcode(self): """ Time :2019-09-17 author : 闫红 desc : 获取短信验证码,返回301 """ rs1 = JdAction.test_api_jingdong_getcode(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_052_api_jingdong_300getcode(self): """ Time :2019-09-17 author : 闫红 desc : 获取短信验证码,返回300 """ rs1 = JdAction.test_api_jingdong_getcode(reqid=reqid, token=token) Assertion.verity(json.loads(rs1)['code'], 300) Assertion.verity(json.loads(rs1)['m'], '短信验证码发送失败') Assertion.verity(json.loads(rs1)['s'], 0)
def test_057_api_jingdong_getcode_token_error(self): """ Time :2019-06-19 author : 罗林 desc : 获取短信验证码,token错误 """ rs1 = JdAction.test_api_jingdong_getcode(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)
def test_055_api_jingdong_getcode_reqid_error(self): """ Time :2019-06-19 author : 罗林 desc : 获取短信验证码,reqid错误 """ rs1 = JdAction.test_api_jingdong_getcode(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)