Ejemplo n.º 1
0
 def test_027_api_taobao_qrverifycode_token_none(self):
     """
     desc       :校验短信验证码 , token为空
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_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.º 2
0
 def test_029_api_taobao_300qrverifycode(self):
     """
     desc       :校验短信验证码
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_qrverifycode(reqid=reqid,
                                                 token=token,
                                                 code='123456')
     Assertion.verity(json.loads(rs1)['code'], 300)
     Assertion.verity(json.loads(rs1)['m'], '短信验证码错误')
     Assertion.verity(json.loads(rs1)['s'], 0)
Ejemplo n.º 3
0
 def test_026_api_taobao_qrverifycode_token_error(self):
     """
     desc       :校验短信验证码 ,token错误
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_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.º 4
0
 def test_025_api_taobao_qrverifycode_reqid_none(self):
     """
     desc       :校验短信验证码 ,reqId为空
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_qrverifycode(reqid='',
                                                 token=token,
                                                 code='123456')
     Assertion.verity(json.loads(rs1)['code'], 403)
     Assertion.verity(json.loads(rs1)['m'], 'reqId不能为空')
     Assertion.verity(json.loads(rs1)['s'], 0)
Ejemplo n.º 5
0
 def test_024_api_taobao_qrverifycode_reqid_error(self):
     """
     desc       :校验短信验证码 ,reqId错误
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_qrverifycode(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)
Ejemplo n.º 6
0
 def test_023_api_taobao_qrverifycode_code_time_out(self):
     """
     desc       :校验短信验证码 ,code超时
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_qrverifycode(reqid=reqid,
                                                 token=token,
                                                 code='123456')
     Assertion.verity(json.loads(rs1)['s'], 0)
     Assertion.verity(json.loads(rs1)['code'], 400)
     Assertion.verity(json.loads(rs1)['m'], '不存在该会话id')
Ejemplo n.º 7
0
 def test_022_api_taobao_qrverifycode_code_none(self):
     """
     desc       :校验短信验证码, code为空
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_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.º 8
0
 def test_030_api_taobao_200qrverifycode(self):
     """
     desc       :校验短信验证码
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_qrverifycode(reqid=reqid,
                                                 token=token,
                                                 code='123456')
     Assertion.verity(json.loads(rs1)['code'], 200)
     Assertion.verity(json.loads(rs1)['m'], '授权成功')
     Assertion.verity(json.loads(rs1)['s'], 1)
     Assertion.verity(json.loads(rs1)['data']['reqId'], '123')