def test_048_api_jingdong_login_reqid_is_null(self): """ Time :2019-06-19 author : 罗林 desc : 使用用户名密码登录并获取信息,非必填reqId为空 """ rs1 = JdAction.test_api_jingdong_login(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'], 0)
def test_046_api_jingdong_login_token_error(self): """ Time :2019-06-19 author : 罗林 desc : 使用用户名密码登录并获取信息 """ rs1 = JdAction.test_api_jingdong_login(reqid=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_047_api_jingdong_login_token_none(self): """ Time :2019-06-19 author : 罗林 desc : 使用用户名密码登录并获取信息 """ rs1 = JdAction.test_api_jingdong_login(reqid=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_043_api_jingdong_login_200return(self): """ Time :2019-06-19 author : 罗林 desc : 使用用户名密码登录并获取信息,返回200 """ rs1 = JdAction.test_api_jingdong_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'], 0)
def test_040_api_jingdong_login_402return(self): """ Time :2019-06-19 author : 罗林 desc : 使用用户名密码登录并获取信息,返回402 """ rs1 = JdAction.test_api_jingdong_login(reqid=reqid, token=token, name=name, password=password) Assertion.verity(json.loads(rs1)['code'], 402) Assertion.verity(json.loads(rs1)['m'], '账户与密码不匹配,请重新输入') Assertion.verity(json.loads(rs1)['s'], 0)
def test_039_api_jingdong_login_401return(self): """ Time :2019-06-19 author : 罗林 desc : 使用用户名密码登录并获取信息,返回401 """ rs1 = JdAction.test_api_jingdong_login(reqid=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_038_api_jingdong_login_502return(self): """ Time :2019-06-19 author : 罗林 desc : 使用用户名密码登录并获取信息,返回502 """ rs1 = JdAction.test_api_jingdong_login(reqid=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)
def test_041_api_jingdong_login_301return(self): """ Time :2019-06-19 author : 罗林 desc : 使用用户名密码登录并获取信息,返回301 """ rs1 = JdAction.test_api_jingdong_login(reqid=reqid, token=token, name=name, password=password) Assertion.verity(json.loads(rs1)['code'], 301) Assertion.verity( json.loads(rs1)['m'], '您的账号需要语音验证码验证,请在京东平台上认证后再进行本平台的授权') Assertion.verity(json.loads(rs1)['s'], 0)