def test_flow_9_6(self, flow_9_6): """ 提现金额大于商户的可结算余额,小于商户的账面余额,准备金账户余额不足 """ PreconditionWithdrawal.mct_update_super_money_pre(is_change=Constants.RESULT.FALSE) # 开启超额提现 PreconditionWithdrawal.mct_update_amount_pre(flow_9_6, set_amt='0') # 补充测试商户的余额与可结算余额 PreconditionWithdrawal.mch_update_prepay_amount() # 设置准备金测试商户的余额和可结算余额 self.err_public(flow_9_6)
def test_flow_9_4(self, flow_9_4): """ 提现金额大于商户的可结算余额,小于商户的账面余额,准备金账户余额不足 """ PreconditionWithdrawal.mct_update_super_money_pre(is_change=Constants.RESULT.TRUE) # 开启超额提现 PreconditionWithdrawal.mct_update_amount_pre(flow_9_4, set_amt='5000') # 补充测试商户的余额与可结算余额 PreconditionWithdrawal.mch_update_prepay_amount() # 设置准备金测试商户的余额和可结算余额 try: self.err_public(flow_9_4) except Exception as e: PreconditionWithdrawal.mct_update_super_money_pre(is_change=Constants.RESULT.FALSE) # 关闭超额提现 raise e PreconditionWithdrawal.mct_update_super_money_pre(is_change=Constants.RESULT.FALSE) # 关闭超额提现
def test_flow_12(self, flow_9_3): """ 子商户结算余额为负数,无提现手续费,提现金额小于准备金,但大于准备金+结算余额进行测试 """ PreconditionWithdrawal.mct_update_amount_pre(flow_9_3, set_amt='-200') PreconditionWithdrawal.mch_update_prepay_amount(amt='10000', set_amt='10000') self.after_treatment_data = Handle.machaccnt_withdraw_handle(flow_9_3) 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_3, is_borrow_money=True, is_service_charge=True, type_befor=True, type_after=False, **kwargs) except Exception as e: PreconditionWithdrawal.mct_update_super_money_pre(is_change=Constants.RESULT.FALSE) # 关闭超额提现 raise e PreconditionWithdrawal.mct_update_super_money_pre(is_change=Constants.RESULT.FALSE) # 关闭超额提现