示例#1
0
 def test_026_api_jingdong_qrgetcode_reqid_is_null(self):
     """
     Time       :2019-09-16
     author     : 闫红
     desc       :获取短信验证码,reqid为空
     """
     rs1 = JdAction.test_api_jingdong_qrgetcode(reqid='', token=token)
     Assertion.verity(json.loads(rs1)['code'], 403)
     Assertion.verity(json.loads(rs1)['m'], 'reqId不能为空')
     Assertion.verity(json.loads(rs1)['s'], 0)
示例#2
0
 def test_025_api_jingdong_qrgetcode_token_is_null(self):
     """
     Time       :2019-09-16
     author     : 闫红
     desc       :获取短信验证码,token为空
     """
     rs1 = JdAction.test_api_jingdong_qrgetcode(reqid=reqid, token='')
     Assertion.verity(json.loads(rs1)['code'], 403)
     Assertion.verity(json.loads(rs1)['m'], 'token不能为空')
     Assertion.verity(json.loads(rs1)['s'], 0)
示例#3
0
 def test_022_api_jingdong_qrget_200code(self):
     """
     Time       :2019-09-16
     author     : 闫红
     desc       :获取短信验证码,返回200
     """
     rs1 = JdAction.test_api_jingdong_qrgetcode(reqid=reqid, token=token)
     Assertion.verity(json.loads(rs1)['code'], 200)
     Assertion.verity(json.loads(rs1)['m'], '短信验证码已发送')
     Assertion.verity(json.loads(rs1)['s'], 0)
示例#4
0
 def test_020_api_jingdong_qrget_301code(self):
     """
     Time       :2019-09-16
     author     : 闫红
     desc       :获取短信验证码,返回301
     """
     rs1 = JdAction.test_api_jingdong_qrgetcode(reqid=reqid, token=token)
     Assertion.verity(json.loads(rs1)['code'], 301)
     Assertion.verity(json.loads(rs1)['m'], '获取验证码操作太频繁,请稍后再试')
     Assertion.verity(json.loads(rs1)['s'], 0)
示例#5
0
 def test_024_api_jingdong_qrgetcode_token_error(self):
     """
     Time       :2019-09-16
     author     : 闫红
     desc       :获取短信验证码,token错误
     """
     rs1 = JdAction.test_api_jingdong_qrgetcode(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)
示例#6
0
 def test_023_api_jingdong_qrgetcode_reqid_error(self):
     """
     Time       :2019-09-16
     author     : 闫红
     desc       :获取短信验证码,reqid错误
     """
     rs1 = JdAction.test_api_jingdong_qrgetcode(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)