From f1810803e1d874a22a49b5bd9b3351fbd2b5b843 Mon Sep 17 00:00:00 2001 From: sonali Date: Thu, 29 Dec 2022 13:07:06 +0530 Subject: [PATCH] fix: passing from_date and to_date filters in test cases passing from_date and to_date filters in test_linked_payments and test_debit_credit_output for unit testing --- .../doctype/bank_transaction/test_bank_transaction.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/bank_transaction/test_bank_transaction.py b/erpnext/accounts/doctype/bank_transaction/test_bank_transaction.py index a5d0413799..3e28610744 100644 --- a/erpnext/accounts/doctype/bank_transaction/test_bank_transaction.py +++ b/erpnext/accounts/doctype/bank_transaction/test_bank_transaction.py @@ -6,7 +6,7 @@ import unittest import frappe from frappe.tests.utils import FrappeTestCase - +from frappe import utils from erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool import ( get_linked_payments, reconcile_vouchers, @@ -40,7 +40,7 @@ class TestBankTransaction(FrappeTestCase): "Bank Transaction", dict(description="Re 95282925234 FE/000002917 AT171513000281183046 Conrad Electronic"), ) - linked_payments = get_linked_payments(bank_transaction.name, ["payment_entry", "exact_match"]) + linked_payments = get_linked_payments(bank_transaction.name, ["payment_entry", "exact_match"],from_date= bank_transaction.date, to_date=utils.today()) self.assertTrue(linked_payments[0][6] == "Conrad Electronic") # This test validates a simple reconciliation leading to the clearance of the bank transaction and the payment @@ -81,7 +81,7 @@ class TestBankTransaction(FrappeTestCase): "Bank Transaction", dict(description="Auszahlung Karte MC/000002916 AUTOMAT 698769 K002 27.10. 14:07"), ) - linked_payments = get_linked_payments(bank_transaction.name, ["payment_entry", "exact_match"]) + linked_payments = get_linked_payments(bank_transaction.name, ["payment_entry", "exact_match"],from_date= bank_transaction.date, to_date=utils.today()) self.assertTrue(linked_payments[0][3]) # Check error if already reconciled