def test_011_api_78dk_sht_merchant_signing_audit_state_pass(self): """ 立即签约,手机号正常,商户名称已经存在(审核通过的),(微信申请、后台申请),名字正常 :return: """ res = json.loads(ShtAction.test_api_78dk_sht_merchant_signing(signname=name + '1', merchantname=merchantname, signphone=mobile)) Assertion.verity(res['code'], '20000') Assertion.verity(res['msg'], '你已经申请过商户了')
def test_015_api_78dk_sht_merchant_signing_sec(self): """ 立即签约, 重复签约 :return: """ res = json.loads( ShtAction.test_api_78dk_sht_merchant_signing(signname=name, merchantname=merchantname, signphone=mobile)) Assertion.verity(res['code'], '20000') Assertion.verity(res['msg'], '你已经申请过商户了')
def test_001_api_78dk_sht_merchant_signing(self): """ 立即签约,输入为空 :return: """ sht_query.update_wx_merchart_null() res = json.loads(ShtAction.test_api_78dk_sht_merchant_signing(signname='', merchantname='', signphone='')) Assertion.verity(res['code'], '20000') Assertion.verityFalse(res['isPage'])
def test_006_api_78dk_sht_merchant_signing_audit_state_false(self): """ 立即签约,手机号正常,商户名称被拒绝,(微信申请、后台申请),名字正常 :return: """ sht_query.update_audit_state("fail", sht_merchantUuid) res = json.loads(ShtAction.test_api_78dk_sht_merchant_signing(signname=name + '1', merchantname=merchantname, signphone=mobile)) Assertion.verity(res['code'], '20000') Assertion.verity(res['msg'], '你已经申请过商户了')
def test_006_api_78dk_sht_merchant_signing_12mobile(self): """ 立即签约,12 手机号错误,公司名称正常,名字正常 :return: """ sht_query.update_wx_merchart_null() res = json.loads(ShtAction.test_api_78dk_sht_merchant_signing(signname=name, merchantname=merchantname, signphone='1838167400433')) Assertion.verity(res['code'], '20000') Assertion.verity(res['msg'], '申请人电话格式不合法')
def test_005_api_78dk_sht_merchant_signing_mobile_not_num(self): """ 立即签约,手机号错误,非数字,公司名称正常,名字正常 :return: """ sht_query.update_wx_merchart_null() res = json.loads(ShtAction.test_api_78dk_sht_merchant_signing(signname=name, merchantname=merchantname, signphone='..ddddweew手机号错误测试')) Assertion.verity(res['code'], '20000') Assertion.verity(res['msg'], '申请人电话格式不合法')
def test_003_api_78dk_sht_merchant_signing_256merchantname(self): """ 立即签约,商户正常,公司名称超长,名字正常 :return: """ sht_query.update_wx_merchart_null() res = json.loads( ShtAction.test_api_78dk_sht_merchant_signing(signname=name, merchantname=MockData.words_cn(256), signphone=mobile)) Assertion.verity(res['code'], '20000') Assertion.verityFalse(res['isPage'])
def test_001_api_78dk_sht_merchant_signing_merchantname_audit_state_pending(self): """ 商户名称是否已经在申请中、待审核、资料未完善、被拒绝、已经有存在的商户(审核通过的商户) 立即签约,手机号正常,商户名称是否已经在申请中(微信申请、后台申请),名字正常 :return: """ global merchantname merchantname = loginAction.global_dict.get("sht_merchantName") sht_query.update_wx_merchart_null() res = json.loads(ShtAction.test_api_78dk_sht_merchant_signing(signname=name + '1', merchantname=merchantname, signphone=mobile)) Assertion.verity(res['code'], '10000') Assertion.verity(res['data']['code'], 'M10000')
def test_007_api_78dk_sht_merchant_signing_3merchantname(self): """ 立即签约,商户正常,公司名称3字符,名字正常 :return: """ sht_query.update_wx_merchart_null() res = json.loads( ShtAction.test_api_78dk_sht_merchant_signing(signname=name, merchantname=merchantname, signphone=mobile)) Assertion.verity(res['code'], '10000') global sht_merchantUuid sht_merchantUuid = res['data']['merchantUuid'] loginAction.global_dict.set(sht_merchantUuid=res['data']['merchantUuid']) loginAction.global_dict.set(sht_merchantName=merchantname)