示例#1
0
 def test_006_api_taobao_300getcode(self):
     """
     desc       :获取短信验证码
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_getcode(reqid=reqid, token=token)
     Assertion.verity(json.loads(rs1)['code'], 300)
     Assertion.verity(json.loads(rs1)['m'], '短信验证码发送失败')
     Assertion.verity(json.loads(rs1)['s'], 0)
示例#2
0
 def test_007_api_taobao_getcode_reqid_error(self):
     """
     desc       :获取短信验证码, reqId 错误
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_getcode(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)
示例#3
0
 def test_005_api_taobao_302getcode(self):
     """
     desc       :获取短信验证码
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_getcode(reqid=reqid, token=token)
     Assertion.verity(json.loads(rs1)['code'], 302)
     Assertion.verity(json.loads(rs1)['m'], '获取次数已达上限,请15分钟后再试')
     Assertion.verity(json.loads(rs1)['s'], 0)
示例#4
0
 def test_004_api_taobao_301getcode(self):
     """
     desc       :获取短信验证码
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_getcode(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_010_api_taobao_getcode_token_none(self):
     """
     desc       :获取短信验证码, token为空
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_getcode(reqid=reqid, token='')
     Assertion.verity(json.loads(rs1)['code'], 403)
     Assertion.verity(json.loads(rs1)['m'], 'token不能为空')
     Assertion.verity(json.loads(rs1)['s'], 0)
示例#6
0
 def test_009_api_taobao_getcode_token_error(self):
     """
     desc       :获取短信验证码 , token错误
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_getcode(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)
示例#7
0
 def test_008_api_taobao_getcode_reqid_none(self):
     """
     desc       :获取短信验证码 ,reqId 为空
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_getcode(reqid='', token=token)
     Assertion.verity(json.loads(rs1)['code'], 403)
     Assertion.verity(json.loads(rs1)['m'], 'reqId不能为空')
     Assertion.verity(json.loads(rs1)['s'], 0)