示例#1
0
 def test_032_api_78dk_app_process_saveUserPlaceOrderGps_gpsregion_overlong(self):
     """
     Time       :2019-08-14
     author     : 闫红
     desc       : 保存位置信息V1.4.0,gpsregion超长
     """
     res = AppAction.test_api_78dk_app_process_saveUserPlaceOrderGps(gpsaddress=gpsaddress, gpscity=gpscity,
         gpsdetail=gpsdetail, gpsinfolat=gpsinfolat, gpsinfolon=gpsinfolon, gpsprovince=gpsprovince,
         gpsregion=MD.words_en(256))
     Assertion.verity(json.loads(res)['code'], '20000')
     Assertion.verity(json.loads(res)['msg'], '系统繁忙,请稍候再试')
示例#2
0
 def test_019_api_78dk_app_process_saveUserPlaceOrderGps_gpsaddress_is_null(self):
     """
     Time       :2019-08-14
     author     : 闫红
     desc       : 保存位置信息V1.4.0,gpsaddress为空
     """
     res = AppAction.test_api_78dk_app_process_saveUserPlaceOrderGps(gpsaddress='', gpscity=gpscity,
         gpsdetail=gpsdetail, gpsinfolat=gpsinfolat, gpsinfolon=gpsinfolon, gpsprovince=gpsprovince,
         gpsregion=gpsregion)
     Assertion.verity(json.loads(res)['code'], '20000')
     Assertion.verity(json.loads(res)['msg'], '完整地址为空!')
示例#3
0
 def test_026_api_78dk_app_process_saveUserPlaceOrderGps_gpsregion_is_null(self):
     """
     Time       :2019-08-14
     author     : 闫红
     desc       : 保存位置信息V1.4.0,gpsregion为空
     """
     res = AppAction.test_api_78dk_app_process_saveUserPlaceOrderGps(gpsaddress=gpsaddress, gpscity=gpscity,
         gpsdetail=gpsdetail, gpsinfolat='113.962145', gpsinfolon='22.982667', gpsprovince=gpsprovince, gpsregion='')
     Assertion.verity(json.loads(res)['code'], '10000')
     global placeordergpsuuid
     placeordergpsuuid = json.loads(res)['data']
 def test_010_api_78dk_app_process_saveBankCardInfo_8bankcardno(self):
     """
     绑定银行卡1-输入银行卡信息
     :return:
     """
     res = json.loads(
         AppAction.test_api_78dk_app_process_saveBankCardInfo(
             bankcardmobile=bank_card_mobile,
             bankcardno=fake.ean8(),
             billemail=bill_email))
     Assertion.verity(res['code'], '20000')
示例#5
0
 def test_039_api_78dk_app_process_createContract_productdetailuuid_none(self):
     """
     创建订单
     :return:
     """
     res = json.loads(
         AppAction.test_api_78dk_app_process_createContract(loanamount=100, isdiscount=True, productdetailuuid='',
             storeuuid=storeuuid, productdetailconfiguuid=productDetailConfigUuid,
             placeordergpsuuid=placeordergpsuuid, projectname='', sauuid=''))
     Assertion.verity(res['code'], '20000')
     Assertion.verity(res['msg'], '产品为空!')
示例#6
0
 def test_015_api_78dk_app_process_submitApply_uuid_not_exits(self):
     """
     提交申请
     :return:
     """
     res = json.loads(
         AppAction.test_api_78dk_app_process_submitApply(
             loanamount=10000,
             productdetailconfiguuid=fake.ean8(),
             repaymentdate=''))
     Assertion.verity(res['code'], '20000')
示例#7
0
 def test_015_api_78dk_app_perCenter_loanDatail(self):
     """
     Time       :2019-08-13
     author     : 闫红
     desc       : 申请详情V1.4.0
     """
     global loanorderuuid
     loanorderuuid = loginAction.global_dict.get('contract_uuid')
     res = AppAction.test_api_78dk_app_perCenter_loanDatail(
         loanorderuuid=loanorderuuid)
     Assertion.verity(json.loads(res)['code'], 'S0003')
示例#8
0
 def test_007_api_78dk_app_process_submitApply_amount_none(self):
     """
     提交申请
     :return:
     """
     res = json.loads(
         AppAction.test_api_78dk_app_process_submitApply(
             loanamount='',
             productdetailconfiguuid=productDetailConfigUuid,
             repaymentdate=''))
     Assertion.verity(res['code'], '10000')
 def test_013_api_78dk_app_process_saveBankCardInfo_billemail_no_com(self):
     """
     绑定银行卡1-输入银行卡信息
     :return:
     """
     res = json.loads(
         AppAction.test_api_78dk_app_process_saveBankCardInfo(
             bankcardmobile=bank_card_mobile,
             bankcardno=bank_card_no,
             billemail='abc@123'))
     Assertion.verity(res['code'], '20000')
示例#10
0
 def test_035_api_78dk_app_process_createContract_false(self):
     """
     创建订单
     :return:
     """
     global sauuid
     sauuid = global_dict.get('saUuid')
     res = json.loads(AppAction.test_api_78dk_app_process_createContract(loanamount=100, isdiscount=False,
         productdetailuuid=productdetailuuid, storeuuid=storeuuid, productdetailconfiguuid=productDetailConfigUuid,
         placeordergpsuuid=placeordergpsuuid, projectname='', sauuid=sauuid))
     Assertion.verity(res['code'], '10000')
示例#11
0
 def test_010_api_78dk_app_common_getDictionaries_datum_type_income(self):
     """
     获取字典列表  薪资
     :return:
     """
     res = json.loads(
         AppAction.test_api_78dk_app_common_getDictionaries(
             datumtype='datum_type_income'))
     Assertion.verity(res['code'], '10000')
     Assertion.verityContain(res['data'], 'id')
     Assertion.verityContain(res['data'], 'typeName')
 def test_007_api_78dk_app_process_saveBankCardInfo_13bankcardmobile(self):
     """
     绑定银行卡1-输入银行卡信息
     :return:
     """
     res = json.loads(
         AppAction.test_api_78dk_app_process_saveBankCardInfo(
             bankcardmobile=fake.ean13(),
             bankcardno=bank_card_no,
             billemail=bill_email))
     Assertion.verity(res['code'], '20000')
     Assertion.verity(res['msg'], '银行卡预留手机号格式错误!')
 def test_009_api_78dk_app_process_saveBankCardInfo_bankcardno_error(self):
     """
     绑定银行卡1-输入银行卡信息
     :return:
     """
     res = json.loads(
         AppAction.test_api_78dk_app_process_saveBankCardInfo(
             bankcardmobile=bank_card_mobile,
             bankcardno='abc',
             billemail=bill_email))
     Assertion.verity(res['code'], '20000')
     Assertion.verity(res['msg'], '银行卡号错误!')
示例#14
0
 def test_039_test_api_78dk_app_process_verifySchool(self):
     """
     学信网认证(新)
     :return:
     """
     res = json.loads(
         AppAction.test_api_78dk_app_process_verifySchool(account='',
                                                          password='',
                                                          school='',
                                                          vcode='',
                                                          taskid=''))
     Assertion.verity(res['code'], '20000')
示例#15
0
 def test_045_api_78dk_app_process_authOrization_error(self):
     """
     (回调接口)爬虫接口中心授权:错误usermobile
     :return:
     """
     res = json.loads(
         AppAction.test_api_78dk_app_process_authOrization(
             usermobile="183"))
     Assertion.verityContain(res['data'], 'loginId')
     Assertion.verityContain(res['data'], 'phoneType')
     Assertion.verityContain(res['data'], 'validateType')
     Assertion.verity(res['code'], '10000')
示例#16
0
 def test_013_api_78dk_app_login_smsLogin(self):
     """
     登录(短信)
     :return: 
     """
     res = json.loads(
         AppAction.test_api_78dk_app_login_smsLogin(
             vercode='123456',
             mobile=loginAction.app_phone,
             jgpushid=loginAction.get_jgPushId()))
     Assertion.verity(res['code'], 'S0012')
     Assertion.verity(res['msg'], '短信验证码错误!')
示例#17
0
 def test_003_api_78dk_app_process_saveOrcInfo_secondkey_none(self):
     """
     保存人脸识别结果
     :return:
     """
     res = json.loads(
         AppAction.test_api_78dk_app_process_saveOrcInfo(firstkey=firstkey,
                                                         secondkey='',
                                                         thirdkey=thirdkey,
                                                         note=note,
                                                         contractuuid='',
                                                         result=0))
     Assertion.verity(res['code'], '10000')
示例#18
0
 def test_043_api_78dk_app_process_authOrization_true(self):
     """
     (回调接口)爬虫接口中心授权_正常
     :return:
     """
     res = json.loads(
         AppAction.test_api_78dk_app_process_authOrization(
             usermobile='13018204373'))
     Assertion.verityContain(res['data'], 'loginId')
     Assertion.verityContain(res['data'], 'phoneType')
     Assertion.verityContain(res['data'], 'validateType')
     Assertion.verity(res['data']['phoneType'], 'unicom')
     Assertion.verity(res['code'], '10000')
示例#19
0
 def test_037_test_api_78dk_app_process_saveContractSupplementImages(self):
     """
     保存补充资料(新)
     :return:
     """
     global contract_uuid
     contract_uuid = xqkj_query.get_contract_uuid_for_user(
         loginAction.get_user_uuid())
     loginAction.global_dict.set(contract_uuid=contract_uuid)
     res = json.loads(
         AppAction.test_api_78dk_app_process_saveContractSupplementImages(
             datalist=[], contractuuid=contract_uuid))
     Assertion.verity(res['code'], '10000')
示例#20
0
 def test_014_api_78dk_app_process_saveIdCardInfo_19cardno(self):
     """
     保存身份证信息
     :return:
     """
     res = json.loads(
         AppAction.test_api_78dk_app_process_saveIdCardInfo(
             cardscanidcardno=fake.random_number(20),
             cardscanname=card_scan_name,
             oppositekey=opposite_key,
             frontkey=front_key,
             frontnote=front_note,
             oppositenote=opposite_note))
     Assertion.verity(res['code'], '20000')
示例#21
0
 def test_020_api_78dk_app_process_saveIdCardInfo(self):
     """
     保存身份证信息
     :return:
     """
     res = json.loads(
         AppAction.test_api_78dk_app_process_saveIdCardInfo(
             cardscanidcardno=card_scan_idcard_no,
             cardscanname=card_scan_name,
             oppositekey=opposite_key,
             frontkey=front_key,
             frontnote=front_note,
             oppositenote=opposite_note))
     Assertion.verity(res['code'], '10000')
示例#22
0
 def test_032_api_78dk_app_process_repayPlanCalculator_storeuuid_none(self):
     """
     还款计划试算
     :return:
     """
     res = json.loads(
         AppAction.test_api_78dk_app_process_repayPlanCalculator(
             isdiscount=True,
             loanamount=10000,
             productdetailconfiguuid=productDetailConfigUuid,
             productdetailuuid=productDetailUuid,
             storeuuid='',
             repaymentdate=''))
     Assertion.verity(res['code'], '20000')
示例#23
0
 def test_002_api_78dk_app_process_getStoreAndProduct_false(self):
     """
     根据门店uuid查询门店商品
     :return:
     """
     res = json.loads(AppAction.test_api_78dk_app_process_getStoreAndProduct(isdiscount=False, storeuuid=storeuuid))
     Assertion.verity(res['code'], '10000')
     # Assertion.verityContain(res['data']['productList'], 'maxQuota')
     # Assertion.verityContain(res['data']['productList'], 'minQuota')
     # Assertion.verityContain(res['data']['productList'], 'name')
     # Assertion.verityContain(res['data']['productList'], 'productDetailUuid')
     Assertion.verityContain(res['data']['store'], 'businessAddress')
     Assertion.verityContain(res['data']['store'], 'storeName')
     Assertion.verityContain(res['data']['store'], 'storeUuid')
示例#24
0
 def test_006_api_78dk_app_process_submitApply(self):
     """
     提交申请
     :return:
     """
     global productDetailConfigUuid
     productDetailConfigUuid = loginAction.global_dict.get(
         'productDetailConfigUuid')
     res = json.loads(
         AppAction.test_api_78dk_app_process_submitApply(
             loanamount=10,
             productdetailconfiguuid=productDetailConfigUuid,
             repaymentdate=''))
     Assertion.verity(res['code'], '10000')
示例#25
0
 def test_034_api_78dk_app_process_createContract_productdetailconfiguuid_none(self):
     """
     创建订单
     :return:
     """
     # user_uuid = loginAction.get_user_uuid()
     global productDetailConfigUuid
     productDetailConfigUuid = loginAction.global_dict.get('productDetailConfigUuid')
     # placeordergpsuuid = xqkj_query.get_info("Tbl_UserPlaceOrderGps", "place_order_gps_uuid",
     #                                         "user_uuid='{}'".format(user_uuid))[-1]
     res = json.loads(AppAction.test_api_78dk_app_process_createContract(loanamount=100, isdiscount=True,
         productdetailuuid=productdetailuuid, storeuuid=storeuuid, productdetailconfiguuid='',
         placeordergpsuuid=placeordergpsuuid, projectname='', sauuid=''))
     Assertion.verity(res['code'], '20000')
     Assertion.verity(res['msg'], '产品期数为空!')
示例#26
0
 def test_007_api_78dk_app_process_saveHoldKey(self):
     """
     保存手持身份证照片
     :return:
     """
     global hold_key, card_scan_idcard_no, card_scan_name, front_key, front_note, opposite_key, opposite_note
     front_key = '0e07631d7a2c2beaa44e29c2a8301e5.png'
     opposite_key = 'b500be2dc3148cbd0cceb9bbe89d9a4.png'
     hold_key = 'des_1560837224439.jpeg'
     card_scan_idcard_no = loginAction.idcard
     card_scan_name = loginAction.user_name
     front_note = opposite_note = ''
     res = json.loads(
         AppAction.test_api_78dk_app_process_saveHoldKey(holdkey=hold_key))
     Assertion.verity(res['code'], '10000')
示例#27
0
 def test_049_api_78dk_app_process_centerCallback_(self):
     """
     (回调接口)爬虫接口中心回调_请求user_id为空
     :return:
     """
     res = json.loads(
         AppAction.test_api_78dk_app_process_centerCallback(
             data='',
             message='阿萨德',
             result='success',
             task_id='123',
             timestamp='1586760300',
             type='1',
             user_id=''))
     Assertion.verity(res['code'], '20000')
示例#28
0
 def test_012_api_78dk_app_process_saveIdCardInfo_16cardno(self):
     """
     保存身份证信息
     :return:
     """
     res = json.loads(
         AppAction.test_api_78dk_app_process_saveIdCardInfo(
             cardscanidcardno='1234567890123456',
             cardscanname=card_scan_name,
             oppositekey=opposite_key,
             frontkey=front_key,
             frontnote='',
             oppositenote=''))
     Assertion.verity(res['code'], '20000')
     Assertion.verity(res['msg'], '身份证号不正确!')
示例#29
0
 def test_025_api_78dk_app_process_repayPlanCalculator_loanamount_min(self):
     """
     还款计划试算
     :return:
     """
     res = json.loads(
         AppAction.test_api_78dk_app_process_repayPlanCalculator(
             isdiscount=True,
             loanamount=0.00000000001,
             productdetailconfiguuid=productDetailConfigUuid,
             productdetailuuid=productDetailUuid,
             storeuuid=store_uuid,
             repaymentdate=''))
     Assertion.verity(res['code'], '20000')
     Assertion.verity(res['msg'], '分期金额必须大于1!')
示例#30
0
 def test_001_api_78dk_app_process_saveContractImages(self):
     """
     保存影像资料
     :return:
     """
     global contract_uuid
     contract_uuid = loginAction.global_dict.get('contract_uuid')
     contract_uuid1 = xqkj_query.get_contract_uuid_for_user(
         loginAction.global_dict.get('user_uuid'))
     image_keys = xqkj_query.get_tbl_infos(
         'Tbl_ContractImage', '`key`',
         'contract_uuid="{}"'.format(contract_uuid1))
     contractimagelist = [{"key": image_key} for image_key in image_keys]
     res = json.loads(
         AppAction.test_api_78dk_app_process_saveContractImages(
             contractimagelist=contractimagelist))
     Assertion.verity(res['code'], '10000')