def test_020_api_mobile_refresh_sms_code_reqid_none(self): """ Time :2019-06-19 author : 罗林 desc :刷新运营商登录的短信验证码接口 """ rs1 = CrawleroperatorAction.test_api_mobile_refresh_sms_code(reqid='', token=token) Assertion.verity(json.loads(rs1)['code'], 0) Assertion.verity(json.loads(rs1)['retMsg'], 'reqId不能为空') Assertion.verityNone(json.loads(rs1)['data'])
def test_017_api_mobile_refresh_sms_code_token_error(self): """ Time :2019-06-19 author : 罗林 desc :刷新运营商登录的短信验证码接口 """ rs1 = CrawleroperatorAction.test_api_mobile_refresh_sms_code(reqid=reqid, token=token + '1') Assertion.verity(json.loads(rs1)['code'], 0) Assertion.verity(json.loads(rs1)['retMsg'], 'token错误') Assertion.verityNone(json.loads(rs1)['data'])
def test_019_api_mobile_refresh_sms_code_reqid_error(self): """ Time :2019-06-19 author : 罗林 desc :刷新运营商登录的短信验证码接口 """ rs1 = CrawleroperatorAction.test_api_mobile_refresh_sms_code(reqid=reqid + '1', token=token) Assertion.verity(json.loads(rs1)['retCode'], 1) Assertion.verity(json.loads(rs1)['retMsg'], '成功') Assertion.verity(json.loads(rs1)['data']['phaseStatus'], 'REFRESH_SMS_FAILED') Assertion.verity(json.loads(rs1)['data']['stage'], 'PREPARE') Assertion.verity(json.loads(rs1)['data']['extra']['remark'], '不存在该reqId')
def test_014_api_mobile_refresh_sms_code(self): """ Time :2019-06-19 author : 罗林 desc :刷新运营商登录的短信验证码接口 """ rs1 = CrawleroperatorAction.test_api_mobile_refresh_sms_code(reqid=reqid, token=token) Assertion.verity(json.loads(rs1)['retCode'], 1) Assertion.verity(json.loads(rs1)['retMsg'], '成功') Assertion.verity(json.loads(rs1)['data']['reqId'], reqid) Assertion.verity(json.loads(rs1)['data']['stage'], 'PREPARE') if json.loads(rs1)['data']['phaseStatus'] == 'REFRESH_SMS_SUCCESS': Assertion.verity(json.loads(rs1)['data']['extra']['remark'], '验证码发送成功') Assertion.verity(json.loads(rs1)['data']['extra']['tips'], '请输入你收到的移动验证码') Assertion.verity(json.loads(rs1)['data']['extra']['title'], '短信验证码') elif json.loads(rs1)['data']['phaseStatus'] == 'REFRESH_SMS_FAILED': Assertion.verity(json.loads(rs1)['data']['extra']['remark'], '对不起,短信随机码获取达到上限!')