示例#1
0
 def test_062_api_taobao_verifycode_token_error(self):
     """
     desc       :校验短信验证码 ,token错误
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_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)
示例#2
0
 def test_060_api_taobao_verifycode_code_none(self):
     """
     desc       :校验短信验证码,code为空
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_verifycode(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)
示例#3
0
 def test_061_api_taobao_verifycode_token_none(self):
     """
     desc       :校验短信验证码 ,token为空
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_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)
示例#4
0
 def test_059_api_taobao_verifycode_reqid_none(self):
     """
     desc       :校验短信验证码,reqId为空
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_verifycode(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)
示例#5
0
 def test_058_api_taobao_verifycode_reqid_error(self):
     """
     desc       :校验短信验证码, reqId错误
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_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)
示例#6
0
 def test_055_api_taobao_301verifycode(self):
     """
     desc       :校验短信验证码
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_verifycode(reqid=reqid,
                                               token=token,
                                               code='123456')
     Assertion.verity(json.loads(rs1)['code'], 301)
     Assertion.verity(json.loads(rs1)['m'], '校验码失效,请重新获取')
     Assertion.verity(json.loads(rs1)['s'], 0)
示例#7
0
 def test_054_api_taobao_500verifycode(self):
     """
     desc       :校验短信验证码
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_verifycode(reqid=reqid,
                                               token=token,
                                               code='123456')
     Assertion.verity(json.loads(rs1)['code'], 500)
     Assertion.verity(json.loads(rs1)['m'], '系统错误,请重试')
     Assertion.verity(json.loads(rs1)['s'], 0)
示例#8
0
 def test_056_api_taobao_200verifycode(self):
     """
     desc       :校验短信验证码
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_verifycode(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'], '')