def test_016_api_telecom_code_submit_all_none(self): """ Time :2019-06-19 author : 罗林 desc :二次验证码提交接口 """ rs1 = TelecomcrawlerAction.test_api_telecom_code_submit( reqid='', token='', name='', code='', sfzname='', idcard='', password='', tu='') Assertion.verity(json.loads(rs1)['code'], 0) Assertion.verity(json.loads(rs1)['retMsg'], 'token不能为空') Assertion.verityNone(json.loads(rs1)['data'])
def test_005_api_telecom_code_submit(self): """ Time :2019-06-19 author : 罗林 desc :二次验证码提交接口 """ rs1 = TelecomcrawlerAction.test_api_telecom_code_submit( reqid=reqid, token=token, name=phone, code='668995', sfzname='徐斌', idcard='513701199406091618', password=password, tu='') Assertion.verity(json.loads(rs1)['code'], 0) Assertion.verityContain(json.loads(rs1)['retMsg'], '登陆已失效请重新登录') Assertion.verityNone(json.loads(rs1)['data'])
def test_018_api_telecom_code_submit_reqid_error(self): """ Time :2019-06-19 author : 罗林 desc :二次验证码提交接口 """ rs1 = TelecomcrawlerAction.test_api_telecom_code_submit( reqid='18752', token='cdddef32b7ec4be9926d30f545e76c371', name=phone, code='441133', sfzname='李超1', idcard='513701199406091618', password=password, tu='') Assertion.verity(json.loads(rs1)['retCode'], 0) Assertion.verity(json.loads(rs1)['retMsg'], 'token错误') Assertion.verityNone(json.loads(rs1)['data'])
def test_038_code_submit(self): """ Time : 2019-11-14 author : 罗林 desc : 二次验证码提交接口 """ rs = json.loads(TelecomcrawlerAction.test_api_telecom_code_submit( reqid=reqid, token=token, name=phone, password='', code='', idcard='', sfzname='', tu='')) Assertion.verity(rs['retCode'], 1) Assertion.verity(rs['retMsg'], '成功') Assertion.verityContain(rs['data'], 'reqId') Assertion.verityContain(rs['data'], 'timestamp') Assertion.verity(rs['data']['phaseStatus'], 'WAITING') Assertion.verity(rs['data']['stage'], 'LOGINED') Assertion.verity(rs['data']['extra']['remark'], '短信验证成功')