Exemple #1
0
 def test_036_api_taobao_qrgetcode_reqid_error(self):
     """
     desc       :获取短信验证码 , reqid错误
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_qrgetcode(reqid='123', token=token)
     Assertion.verity(json.loads(rs1)['code'], 400)
     Assertion.verity(json.loads(rs1)['m'], '不存在该会话id')
     Assertion.verity(json.loads(rs1)['s'], 0)
Exemple #2
0
 def test_038_api_taobao_qrgetcode_token_none(self):
     """
     desc       :获取短信验证码 , token为空
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_qrgetcode(reqid=reqid, token='')
     Assertion.verity(json.loads(rs1)['code'], 403)
     Assertion.verity(json.loads(rs1)['m'], 'token不能为空')
     Assertion.verity(json.loads(rs1)['s'], 0)
Exemple #3
0
 def test_035_api_taobao_304qrgetcode_reqid_none(self):
     """
     desc       :获取短信验证码 , reqid为空
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_qrgetcode(reqid='', token=token)
     Assertion.verity(json.loads(rs1)['code'], 403)
     Assertion.verity(json.loads(rs1)['m'], 'reqId不能为空')
     Assertion.verity(json.loads(rs1)['s'], 0)
Exemple #4
0
 def test_034_api_taobao_304qrgetcode(self):
     """
     desc       :获取短信验证码
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_qrgetcode(reqid=reqid, token=token)
     Assertion.verity(json.loads(rs1)['code'], 304)
     Assertion.verity(json.loads(rs1)['m'], '发送短信验证码出错!')
     Assertion.verity(json.loads(rs1)['s'], 0)
Exemple #5
0
 def test_032_api_taobao_200qrgetcode(self):
     """
     desc       :获取短信验证码
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_qrgetcode(reqid=reqid, token=token)
     Assertion.verity(json.loads(rs1)['code'], 200)
     Assertion.verity(json.loads(rs1)['m'], '短信验证码已发送')
     Assertion.verity(json.loads(rs1)['s'], 1)
Exemple #6
0
 def test_031_api_taobao_500qrgetcode(self):
     """
     desc       :获取短信验证码
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_qrgetcode(reqid=reqid, token=token)
     Assertion.verity(json.loads(rs1)['code'], 500)
     Assertion.verity(json.loads(rs1)['m'], '系统错误,请重试')
     Assertion.verity(json.loads(rs1)['s'], 0)
Exemple #7
0
 def test_037_api_taobao_qrgetcode_token_error(self):
     """
     desc       :获取短信验证码 , token错误
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_qrgetcode(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)