Ejemplo n.º 1
0
 def test_034_api_jingdong_qrverifycode_token_error(self):
     """
     Time       :2019-06-19
     author     : 罗林
     desc       : 校验短信验证码
     """
     rs1 = JdAction.test_api_jingdong_qrverifycode(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)
Ejemplo n.º 2
0
 def test_035_api_jingdong_qrverifycode_token_none(self):
     """
     Time       :2019-06-19
     author     : 罗林
     desc       : 校验短信验证码
     """
     rs1 = JdAction.test_api_jingdong_qrverifycode(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)
Ejemplo n.º 3
0
 def test_032_api_jingdong_qrverifycode_reqid_error(self):
     """
     Time       :2019-06-19
     author     : 罗林
     desc       : 校验短信验证码
     """
     rs1 = JdAction.test_api_jingdong_qrverifycode(reqid=reqid + 'q1',
                                                   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)
Ejemplo n.º 4
0
 def test_031_api_jingdong_qrverifycode_code_none(self):
     """
     Time       :2019-06-19
     author     : 罗林
     desc       : 校验短信验证码,code为空
     """
     rs1 = JdAction.test_api_jingdong_qrverifycode(reqid=reqid,
                                                   token=token,
                                                   code='')
     Assertion.verity(json.loads(rs1)['code'], 403)
     Assertion.verity(json.loads(rs1)['m'], 'code不能为空')
     Assertion.verity(json.loads(rs1)['s'], 0)
Ejemplo n.º 5
0
 def test_030_api_jingdong_qrverifycode_301code(self):
     """
     Time       :2019-06-19
     author     : 罗林
     desc       : 校验短信验证码,返回301
     """
     rs1 = JdAction.test_api_jingdong_qrverifycode(reqid=reqid,
                                                   token=token,
                                                   code='1')
     Assertion.verity(json.loads(rs1)['code'], 301)
     Assertion.verity(json.loads(rs1)['m'], '本次验证已失效,请重新获取二维码重试')
     Assertion.verity(json.loads(rs1)['s'], 0)
Ejemplo n.º 6
0
 def test_029_api_jingdong_qrverifycode_300code(self):
     """
     Time       :2019-06-19
     author     : 罗林
     desc       : 校验短信验证码,返回300
     """
     rs1 = JdAction.test_api_jingdong_qrverifycode(reqid=reqid,
                                                   token=token,
                                                   code='1')
     Assertion.verity(json.loads(rs1)['code'], 300)
     Assertion.verity(json.loads(rs1)['m'], '手机验证码错误')
     Assertion.verity(json.loads(rs1)['s'], 0)
Ejemplo n.º 7
0
 def test_027_api_jingdong_qrverifycode_code(self):
     """
     Time       :2019-06-19
     author     : 罗林
     desc       : 校验短信验证码
     """
     rs1 = JdAction.test_api_jingdong_qrverifycode(reqid=reqid,
                                                   token=token,
                                                   code='1')
     Assertion.verity(json.loads(rs1)['code'], 200)
     Assertion.verity(json.loads(rs1)['m'], '授权成功')
     Assertion.verity(json.loads(rs1)['s'], 1)