def test_025_api_78dk_sht_store_modifystorebasic_storeprovincecode_none( self): """ 新增门店基本信息: :return: """ res = json.loads( ShtAction.test_api_78dk_sht__store_modifyStoreBasic( storeprovincecode='', leasetimebegin='2019-08-08', storename='门店名字' + MockData.words_cn(2), leasetimeend='2020-08-08', employeesnum=100, storeregion='新华区', managername=name, managerphone=mobile, storeuuid='', storecitycode='130100', storeregioncode='130105', area='1999', storeaddress='123', storeprovince='河北省', idcardnumber=cardnumber, email=email, storecity='石家庄市')) Assertion.verity(res['code'], '20000') Assertion.verity(res['msg'], '数据完整性错误')
def test_009_api_78dk_platform_om_bd_addBdInfo_email_error(self): """ BD新增 email error :return: """ res = WebAction.test_api_78dk_platform_om_bd_addBdInfo( email=MockData.words_cn(10), mobile=mobile, name=bd_name) Assertion.verity(json.loads(res)['code'], '20000') Assertion.verity(json.loads(res)['msg'], '邮箱的格式不合法,')
def test_020_ui_user_getUserInfo_error(self): """ Time :20120-04-10 author : 闫红 desc :用户信息,userid格式不正确 """ userid = MockData.words_cn(3) res = json.loads(Creditpay_urAction.test_ui_user_getUserInfo(userid=userid)) Assertion.verity(res['code'], '20000')
def test_025_api_78dk_platform_tm_first_saveCustomerInformation_customerinformation_overlong(self): """ Time :2019-07-22 author : 闫红 desc : 电核备注 - 客户信息 保存接口 V1.3 新增,contract_uuid超长 """ res = PlatformAction.test_api_78dk_platform_tm_first_saveCustomerInformation( contractuuid=contract_uuid, customerinformation=MD.words_cn(256)) Assertion.verity(json.loads(res)['msg'], '成功') Assertion.verity(json.loads(res)['code'], '10000')
def test_013_api_78dk_platform_urge_member_addMemberUser_not_str(self): """ Time :2019-09-27 author : 闫红 desc :添加一个催收人员_v1.5.2,useruuid非字符串 """ useruuid = MD.words_cn(2) print(useruuid) res = json.loads(WebAction.test_api_78dk_platform_urge_user_addMemberUser(useruuid=useruuid)) Assertion.verity(res['code'], '20000') Assertion.verityContain(res['msg'], '不能添加为催收人员')
def test_006_api_78dk_platform_om_bd_addBdInfo_256email(self): """ BD新增 256 email :return: """ global channelid channelid = loginAction.global_dict.get('channelid') res = WebAction.test_api_78dk_platform_om_bd_addBdInfo( email=MockData.words_cn(256), mobile=mobile, name=bd_name) Assertion.verity(json.loads(res)['code'], '20000') Assertion.verity(json.loads(res)['msg'], '邮箱的格式不合法,')
def test_026_api_78dk_sht_mm_base_ShtActioniness_modifyaccountinfo_21branchname(self): """ 保存商户帐户信息---企业账户-异常场景--支行名称超长 :return: """ res = json.loads( ShtAction.test_api_78dk_sht_mm_base_business_modifyAccountInfo(accountnumber='6228481268248914675', shyhkfm='', accountopeningbank='开户行名称', shyhkzm='', uuid=sht_merchantUuid, shzm='', accounttype='public_accounts', branchname=MockData.words_cn(21), accountname='开户人姓名')) Assertion.verity(res['msg'], '支行名称过长') Assertion.verity(res['code'], 'S0006')
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_011_ui_user_findUserBill_name_overlong(self): """ Time :20120-04-10 author : 闫红 desc :逾期用户-列表,姓名超长 """ name = MockData.words_cn(256) res = json.loads(Creditpay_urAction.test_ui_user_findUserBill(cardno='', loantimebegin='', loantimeend='', phone='', realname=name, shouldrepaymentbegin='', shouldrepaymentend='', stage='', currentpage=1, pagesize=10)) Assertion.verity(res['code'], '10000') Assertion.verity(res['msg'], '成功')
def test_004_backstage_tenant_config_tenant_list_overlong(self): """ Time :2019-07-15 author : 闫红 desc : 机构管理员列表查询,条件超过255位 """ tenant_name = MD.words_cn(256) rs = PmsAction.test_backstage_tenant_config_tenant_list(name=tenant_name, currentpage=1, pagesize=10) Assertion.verity(json.loads(rs)['code'], 10000) Assertion.verity(json.loads(rs)['msg'], 'SUCCESS') Assertion.verityNone(json.loads(rs)['data']['objs'])
def test_004_backstage_user_list_overlong(self): """ Time :2019-07-17 author : 闫红 desc : 用户列表查询,name超长 """ name = MD.words_cn(256) rs = PmsAction.test_backstage_user_list(name=name, currentpage=1, pagesize=10) Assertion.verity(json.loads(rs)['code'], 10000) Assertion.verity(json.loads(rs)['msg'], "SUCCESS") Assertion.verityNone(json.loads(rs)['data']['objs'])
def test_053_api_78dk_platform_om_repayment_findRepaymentList_userName_not_exits(self): """ 还款列表 查询 借款人 不存在 :return: """ res = json.loads(WebAction.test_api_78dk_platform_om_repayment_findRepaymentList( lastpaydateendtime='', auditstate="audit_state_all", auditoptname='', lastpaydatebegintime='', username=MockData.words_cn(10), contractnumber='', usermobile='', overduestate="overdue_state_all", paystate="pay_state_all", applyoptname='', pagesize=10, pagecurrent=1, merchantname='')) Assertion.verity(res['code'], '10000') Assertion.verity(res['msg'], '成功')
def test_017_ui_user_findUserBill_phone(self): """ Time :20120-04-10 author : 闫红 desc :逾期用户-列表,电话输入座机 """ phone = '010-'+MockData.words_cn(9) res = json.loads(Creditpay_urAction.test_ui_user_findUserBill(cardno='', loantimebegin='', loantimeend='', phone=phone, realname='', shouldrepaymentbegin='', shouldrepaymentend='', stage='', currentpage=1, pagesize=10)) Assertion.verity(res['code'], '10000') Assertion.verity(res['msg'], '成功')
def test_007_backstage_tenant_administrator_list_overlong(self): """ Time :2019-07-15 author : 闫红 desc : 未新增管理员,关键字名称超长,查询管理员 """ tenantid = pq.get_tenantid('系统', '机构') name = MD.words_cn(256) rs = PmsAction.test_backstage_tenant_administrator_list(tenantid=tenantid,currentpage=1,name=name,pagesize=10) Assertion.verity(json.loads(rs)['code'], 10000) Assertion.verity(json.loads(rs)['msg'], "SUCCESS") Assertion.verityNone(json.loads(rs)['data']['objs'])
def test_007_backstage_system_add_overlong(self): """ Time :2019-07-15 author : 闫红 desc : 新增系统接口 (name超长) """ overlong_name = '系统' + MD.words_cn(255) rs = PmsAction.test_backstage_system_add( businesssystemuuid=businesssystemuuid, host=host, name=overlong_name, secret=secret) Assertion.verityNot(json.loads(rs)['code'], 10000) Assertion.verityNot(json.loads(rs)['msg'], "SUCCESS")
def test_024_backstage_system_edit_overlong(self): """ Time :2019-07-15 author : 闫红 desc : 编辑系统接口,名字超长 """ business_id = pq.get_business_id('系统') overname = '编辑' + MD.words_cn(255) rs = PmsAction.test_backstage_system_edit( id=business_id, name=overname, businesssystemuuid=businesssystemuuid, secret=secret, host=host) Assertion.verityNot(json.loads(rs)['code'], 10000) Assertion.verityNot(json.loads(rs)['msg'], "SUCCESS")
def test_014_api_78dk_platform_sys_user_saveSystemUser_name_not_exits( self): """ 合同列表查询(申请列表) 名称不存在 :return: """ res = json.loads( WebAction.test_api_78dk_platform_om_contract_viewContracts( pagecurrent=1, orderstate="", enddate='', begindate='', pagesize=10, name=MockData.words_cn(10))) Assertion.verity(res['code'], '10000') Assertion.verity(res['msg'], '成功') Assertion.verityNone(res['data']['dataList'])
def test_042_api_78dk_platform_om_trans_findTransLogList_searchwhere_not_exits( self): """ 交易流水列表 查询不存在的交易对象 :return: """ res = json.loads( WebAction.test_api_78dk_platform_om_trans_findTransLogList( pagesize=10, pagecurrent=1, enddate='', begindate='', transstate="", searchwhere=MockData.words_cn(10), transtype="")) Assertion.verity(res['code'], '10000') Assertion.verity(res['msg'], '成功') Assertion.verityNone(res['data']['dataList'])
""" import json import unittest from faker import Factory from common.myCommon import Assertion from common.myCommon.TestBaseCase import TestBaseCase from common.myFile import MockData as MD from mjjry.query import xqkj_query from mjjry.testAction import WebAction from mjjry.testAction import loginAction from mjjry.testAction import specialAction fake = Factory().create('zh_CN') labelcontent = loginAction.sign + MD.words_cn(2) customerinformation = loginAction.sign + MD.words_cn(2) impactdata = loginAction.sign + MD.words_cn(2) windcontroldatasource = loginAction.sign + MD.words_en_lower(2) class test_019_web_FirstCheck_two(TestBaseCase): @unittest.skip('美佳无') def test_001_api_78dk_platform_tm_first_xuexinreport(self): """ Time :2019-07-22 author : 闫红 desc : 学信网报告 V1.3 新增 """ global contract_uuid contract_uuid = loginAction.global_dict.get('contract_uuid')
def test_015_api_78dk_sht_mm_base_legal_modifylegalperson_256name(self): """ 保存商户法人信息--异常场景-法人姓名超长 :return: """ res = json.loads( ShtAction.test_api_78dk_sht_mm_base_legal_modifyLegalPerson(shfrsfzfsc='', name=MockData.words_cn(256), uuid=sht_merchantUuid, shfrsfzf='', mobile=mobile, cardnumber=idcard, shfrsfzz='')) Assertion.verity(res['code'], 'S0006') Assertion.verity(res['msg'], '法人姓名长度过长')
def test_041_api_78dk_sht_mm_modifymerchantinfo_21name(self): """ 保存商户基础信息---商户名为超长 :return: """ res = json.loads( ShtAction.test_api_78dk_sht_mm_modifyMerchantInfo(tradefirst='1', shzzjgdm='', name=MockData.words_cn(21), uuid=sht_merchantUuid, organizationcode='123', taxregistrationnumber='123', socialunifiedcreditcode='123', shswdjz='', shyyzz='', installmentcooperationorgs=[], city='110100', province='110000', papermergen=False, tradesecond='7')) Assertion.verity(res['msg'], '公司名称过长') Assertion.verity(res['code'], 'S0006')