示例#1
0
 def test_051_api_taobao_login_token_error(self):
     """
     desc       :使用用户名密码登录并获取信息, token错误
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_login(reqid='',
                                          token=token + '1',
                                          name=name,
                                          password=password)
     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_052_api_taobao_login_token_none(self):
     """
     desc       :使用用户名密码登录并获取信息 ,token为空
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_login(reqid='',
                                          token='',
                                          name=name,
                                          password=password)
     Assertion.verity(json.loads(rs1)['code'], 403)
     Assertion.verity(json.loads(rs1)['m'], 'token不能为空')
     Assertion.verity(json.loads(rs1)['s'], 0)
示例#3
0
 def test_049_api_taobao_login_password_none(self):
     """
     desc       :使用用户名密码登录并获取信息 ,password为空
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_login(reqid=reqid,
                                          token=token,
                                          name=name,
                                          password='')
     Assertion.verity(json.loads(rs1)['code'], 403)
     Assertion.verity(json.loads(rs1)['m'], 'password不能为空')
     Assertion.verity(json.loads(rs1)['s'], 0)
示例#4
0
 def test_050_api_taobao_login_name_none(self):
     """
     desc       :使用用户名密码登录并获取信息,name为空
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_login(reqid=reqid,
                                          token=token,
                                          name='',
                                          password=password)
     Assertion.verity(json.loads(rs1)['code'], 403)
     Assertion.verity(json.loads(rs1)['m'], 'name不能为空')
     Assertion.verity(json.loads(rs1)['s'], 0)
示例#5
0
 def test_048_api_taobao_400login_reqid_none(self):
     """
     desc       :使用用户名密码登录并获取信息, reqid为空
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_login(reqid='',
                                          token=token,
                                          name=name,
                                          password=password)
     Assertion.verity(json.loads(rs1)['code'], 400)
     Assertion.verity(json.loads(rs1)['m'], '你输入的密码和账户名不匹配')
     Assertion.verity(json.loads(rs1)['s'], 0)
示例#6
0
 def test_046_api_taobao_401login_reqid_none(self):
     """
     desc       :使用用户名密码登录并获取信息 , reqid为空
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_login(reqid='',
                                          token=token,
                                          name=name,
                                          password=password)
     Assertion.verity(json.loads(rs1)['code'], 401)
     Assertion.verity(json.loads(rs1)['m'], '该账户已被冻结,暂时无法登录')
     Assertion.verity(json.loads(rs1)['s'], 0)
示例#7
0
 def test_045_api_taobao_502login_reqid_none(self):
     """
     desc       :使用用户名密码登录并获取信息, reqid为空
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_login(reqid='',
                                          token=token,
                                          name=name,
                                          password=password)
     Assertion.verity(json.loads(rs1)['code'], 502)
     Assertion.verity(json.loads(rs1)['m'], '系统繁忙,请稍后再试')
     Assertion.verity(json.loads(rs1)['s'], 0)
示例#8
0
 def test_039_api_taobao_300login(self):
     """
     desc       :使用用户名密码登录并获取信息
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_login(reqid=reqid,
                                          token=token,
                                          name=name,
                                          password=password)
     Assertion.verity(json.loads(rs1)['code'], 300)
     Assertion.verity(json.loads(rs1)['m'], '需要短信认证')
     Assertion.verity(json.loads(rs1)['s'], 0)
示例#9
0
 def test_042_api_taobao_200login(self):
     """
     desc       :使用用户名密码登录并获取信息
     author     : 罗林
     """
     rs1 = TbAction.test_api_taobao_login(reqid=reqid,
                                          token=token,
                                          name=name,
                                          password=password)
     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'], '12345')