def test_8(self, login_fix, merchant_login_fix): '''单笔放款到银行卡''' s = login_fix ms = merchant_login_fix sj = SF() DF = DRG_func(s) DM = Drg_merchant(ms) #运营端修改商户出金方式为银行卡 licenceSerialNumber = time.strftime("%Y%m%d%H%M%S") smscode = licenceSerialNumber[2:8] DF.login_sucess(smscode) bankBranchCode = sj.phone() # 出金模式银行卡:BANK_CARD # 出金模式小程序钱包:APPLET_WALLET issuType = "BANK_CARD" result = DF.merchant_editDetail_bybankcard(issuType, bankBranchCode) #商户端单笔放款到银行卡 issuname = "郑国" issuidCard = "350181199006012155" issuamount = "2" accountNumber = '6232111820006508170' sql = 'select * FROM spman_center.task where merchant_name = "极限传媒" and status = 1 order by id desc limit 1;' r = select_taskid_number(sql) taskId = str(r[0]["id"]) result1 = DM.issu_by_bankcard(issuname, issuidCard, issuamount, accountNumber, taskId) batchNo = result1["data"]["batchNo"] result2 = DM.batchIssu_loan(batchNo) assert result2["message"]["content"] == "处理中, 请稍后..."
def login_fix(request): #相当于打开浏览器 session = requests.session() code = time.strftime("%Y%m%d%H%M%S") smscode = code[2:8] DF = DRG_func(session) DF.login_sucess(smscode) print("登录成功") #这里yield s返回的是最新的cookie yield session #关闭session def close_s(): session.close() # 终结'''自定义一个前置操作''' request.addfinalizer(close_s) print("退出登录")
def test_10(self, login_fix, merchant_login_fix): '''保存订单至:未支付-待放款后,放款至银行卡''' s = login_fix ms = merchant_login_fix sj = SF() DF = DRG_func(s) DM = Drg_merchant(ms) # 运营端修改商户出金方式为银行卡 licenceSerialNumber = time.strftime("%Y%m%d%H%M%S") smscode = licenceSerialNumber[2:8] DF.login_sucess(smscode) bankBranchCode = sj.phone() # 出金模式银行卡:BANK_CARD # 出金模式小程序钱包:APPLET_WALLET issuType = "BANK_CARD" result = DF.merchant_editDetail_bybankcard(issuType, bankBranchCode) # 商户端单笔放款到银行卡 issuname = "郑国" issuidCard = "350181199006012155" issuamount = "2" accountNumber = '6232111820006508170' sql = 'select * FROM spman_center.task where merchant_name = "极限传媒" and status = 1 order by id desc limit 1;' r = select_taskid_number(sql) taskId = str(r[0]["id"]) result1 = DM.issu_by_bankcard(issuname, issuidCard, issuamount, accountNumber, taskId) batchNo = result1["data"]["batchNo"] #保存验证成功订单 result2 = DM.save_Verify_SuccessOrder(batchNo) #查询订单详情 result3 = DM.SuccessOrder_list(batchNo) #查询放款单号 systemOrderNumbers = result3["data"]["dataList"][0][ "systemOrderNumber"] #未支付-待放款后,放款至银行卡 result4 = DM.preSave_Loan(systemOrderNumbers) assert result4["message"]["content"] == "处理中, 请稍后..."