def test_flow_9_3(self, flow_9_3): """ 提现金额大于商户的可结算余额,小于商户的账面余额,开启超额提现但没有准备金账户 """ PreconditionWithdrawal.mct_update_super_money_pre(is_change=Constants.RESULT.TRUE) # 开启超额提现 PreconditionWithdrawal.mct_update_amount_pre(flow_9_3, set_amt='5000') # 补充测试商户的余额与可结算余额 PreconditionWithdrawal.mct_promotion_pre(button=Constants.RESULT.FALSE, all=Constants.RESULT.TRUE) # 清空准备金类型商户 try: self.err_public(flow_9_3) except Exception as e: PreconditionWithdrawal.mct_update_super_money_pre(is_change=Constants.RESULT.TRUE) # 关闭超额提现 PreconditionWithdrawal.mct_promotion_pre(button=Constants.RESULT.TRUE) # 还原准备金类型商户 raise e PreconditionWithdrawal.mct_update_super_money_pre(is_change=Constants.RESULT.FALSE) # 关闭超额提现 PreconditionWithdrawal.mct_promotion_pre(button=Constants.RESULT.TRUE) # 还原准备金类型商户
def test_flow_13(self, flow_9_4): """ 商户类型为子商户,有提现手续费,提现金额大于商户可结算余额,小于商户账面余额,开启超额提现,存在多个准备金账户借款流程测试 测试结果:只会扣减第一个准备金账户 """ PreconditionWithdrawal.mct_update_amount_pre(flow_9_4, set_amt='1000') PreconditionWithdrawal.mct_promotion_pre(button=Constants.RESULT.TRUE, all=Constants.RESULT.TRUE) # 将准备金数量更改至大于1 self.after_treatment_data = Handle.machaccnt_withdraw_handle(flow_9_4) PreconditionWithdrawal.mct_update_super_money_pre(is_change=Constants.RESULT.TRUE) # 开启超额提现 kwargs = MachRefundPass.creat_except_data(with_draw_info_index=1, mch_accnt_info_index=1, his_settled_amount_index=1, propay_index=1) try: self.flow_pass_public(data=flow_9_4, is_borrow_money=True, is_service_charge=False, type_befor=True, type_after=False, **kwargs) except Exception as e: PreconditionWithdrawal.mct_update_super_money_pre(is_change=Constants.RESULT.FALSE) # 关闭超额提现 PreconditionWithdrawal.mct_promotion_pre(button=Constants.RESULT.TRUE, all=Constants.RESULT.TRUE) # 还原准备金数量 raise e PreconditionWithdrawal.mct_update_super_money_pre(is_change=Constants.RESULT.FALSE) # 关闭超额提现 PreconditionWithdrawal.mct_promotion_pre(button=Constants.RESULT.TRUE, all=Constants.RESULT.TRUE) # 还原准备金数量