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)
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)
def test_017_api_taobao_302verifyqrcode(self): """ desc :验证二维码是否已扫描,并获取信息 author : 罗林 """ rs1 = TbAction.test_api_taobao_verifyqrcode(reqid=reqid, token=token) Assertion.verity(json.loads(rs1)['code'], 302) Assertion.verity(json.loads(rs1)['m'], '需要短信验证') Assertion.verity(json.loads(rs1)['s'], 0)
def test_021_api_taobao_verifyqrcode_token_none(self): """ desc :验证二维码是否已扫描,并获取信息 ,token为空 author : 罗林 """ rs1 = TbAction.test_api_taobao_verifyqrcode(reqid=reqid, token='') Assertion.verity(json.loads(rs1)['code'], 403) Assertion.verity(json.loads(rs1)['m'], 'token不能为空') Assertion.verity(json.loads(rs1)['s'], 0)
def test_019_api_taobao_verifyqrcode_reqid_none(self): """ desc :验证二维码是否已扫描,并获取信息 ,reqId为空 author : 罗林 """ rs1 = TbAction.test_api_taobao_verifyqrcode(reqid='', token=token) Assertion.verity(json.loads(rs1)['code'], 403) Assertion.verity(json.loads(rs1)['m'], 'reqId不能为空') Assertion.verity(json.loads(rs1)['s'], 0)
def test_016_api_taobao_200verifyqrcode(self): """ desc :验证二维码是否已扫描,并获取信息 author : 罗林 """ rs1 = TbAction.test_api_taobao_verifyqrcode(reqid=reqid, token=token) Assertion.verity(json.loads(rs1)['code'], 200) Assertion.verity(json.loads(rs1)['m'], '授权成功') Assertion.verity(json.loads(rs1)['s'], 1)
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)
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)
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)
def test_020_api_taobao_verifyqrcode_token_error(self): """ desc :验证二维码是否已扫描,并获取信息 ,token错误 author : 罗林 """ rs1 = TbAction.test_api_taobao_verifyqrcode(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)
def test_018_api_taobao_verifyqrcode_reqid_error(self): """ desc :验证二维码是否已扫描,并获取信息 ,reqId错误 author : 罗林 """ rs1 = TbAction.test_api_taobao_verifyqrcode(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)
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)
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')
def test_065_api_taobao_200getqrcode_reqid_none(self): """ desc :获取二维码 , reqid为空 author : 罗林 """ rs1 = TbAction.test_api_taobao_getqrcode(reqid='', token=token) Assertion.verity(json.loads(rs1)['code'], 200) Assertion.verity(json.loads(rs1)['m'], '获取二维码成功') Assertion.verity(json.loads(rs1)['s'], 1) Assertion.verityNotNone(json.loads(rs1)['data']['pic']) Assertion.verityNotNone(json.loads(rs1)['data']['reqId'])
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)
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)
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)
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)
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)
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)
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)
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)
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'], '')
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)
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)
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)
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)
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)
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)
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)