Esempio n. 1
0
 def test_068_api_jingdong_verifycode_token_none(self):
     """
     Time       :2019-06-19
     author     : 罗林
     desc       : 校验短信验证码
     """
     rs1 = JdAction.test_api_jingdong_verifycode(reqid=reqid,
                                                 token='',
                                                 code='123456')
     Assertion.verity(json.loads(rs1)['code'], 403)
     Assertion.verity(json.loads(rs1)['m'], 'token不能为空')
     Assertion.verity(json.loads(rs1)['s'], 0)
Esempio n. 2
0
 def test_067_api_jingdong_verifycode_token_error(self):
     """
     Time       :2019-06-19
     author     : 罗林
     desc       : 校验短信验证码
     """
     rs1 = JdAction.test_api_jingdong_verifycode(reqid=reqid,
                                                 token=token + '1',
                                                 code='123456')
     Assertion.verity(json.loads(rs1)['code'], 501)
     Assertion.verity(json.loads(rs1)['m'], 'token错误')
     Assertion.verity(json.loads(rs1)['s'], 0)
Esempio n. 3
0
 def test_065_api_jingdong_verifycode_reqid_error(self):
     """
     Time       :2019-06-19
     author     : 罗林
     desc       : 校验短信验证码
     """
     rs1 = JdAction.test_api_jingdong_verifycode(reqid=reqid + '1',
                                                 token=token,
                                                 code='123456')
     Assertion.verity(json.loads(rs1)['code'], 400)
     Assertion.verity(json.loads(rs1)['m'], '不存在该会话id')
     Assertion.verity(json.loads(rs1)['s'], 0)
Esempio n. 4
0
 def test_063_api_jingdong_verifycode_301code(self):
     """
     Time       :2019-09-17
     author     : 闫红
     desc       : 校验短信验证码,返回301
     """
     rs1 = JdAction.test_api_jingdong_verifycode(reqid=reqid,
                                                 token=token,
                                                 code='123')
     Assertion.verity(json.loads(rs1)['code'], 301)
     Assertion.verity(json.loads(rs1)['m'], '验证码输入有误,请重新输入')
     Assertion.verity(json.loads(rs1)['s'], 0)
Esempio n. 5
0
 def test_061_api_jingdong_verifycode_200code(self):
     """
     Time       :2019-09-17
     author     : 闫红
     desc       : 校验短信验证码,返回200
     """
     rs1 = JdAction.test_api_jingdong_verifycode(reqid=reqid,
                                                 token=token,
                                                 code='123')
     Assertion.verity(json.loads(rs1)['code'], 200)
     Assertion.verity(json.loads(rs1)['m'], '授权成功')
     Assertion.verity(json.loads(rs1)['s'], 0)
Esempio n. 6
0
 def test_059_api_jingdong_verifycode_302code(self):
     """
     Time       :2019-09-17
     author     : 闫红
     desc       : 校验短信验证码,返回302
     """
     rs1 = JdAction.test_api_jingdong_verifycode(reqid=reqid,
                                                 token=token,
                                                 code='123')
     Assertion.verity(json.loads(rs1)['code'], 302)
     Assertion.verity(json.loads(rs1)['m'], '风险用户与验证类型不匹配')
     Assertion.verity(json.loads(rs1)['s'], 0)