-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Loan entries in Bank Reco Statement report
- Loading branch information
1 parent
f6fb00b
commit fd8d9a3
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
erpnext/accounts/report/bank_reconciliation_statement/test_bank_reconciliation_statement.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and Contributors | ||
# See license.txt | ||
|
||
import frappe | ||
from frappe.tests.utils import FrappeTestCase | ||
|
||
from erpnext.accounts.report.bank_reconciliation_statement.bank_reconciliation_statement import ( | ||
execute, | ||
) | ||
from erpnext.loan_management.doctype.loan.test_loan import create_loan_accounts | ||
from erpnext.accounts.doctype.bank_transaction.test_bank_transaction import create_loan_and_repayment | ||
|
||
|
||
class TestBankReconciliationStatement(FrappeTestCase): | ||
def setUp(self): | ||
for dt in [ | ||
"Loan Repayment", | ||
"Loan Disbursement", | ||
"Journal Entry", | ||
"Journal Entry Account", | ||
"Payment Entry", | ||
]: | ||
frappe.db.delete(dt) | ||
|
||
def test_loan_entries_in_bank_reco_statement(self): | ||
create_loan_accounts() | ||
repayment_entry = create_loan_and_repayment() | ||
|
||
filters = frappe._dict( | ||
{ | ||
"company": "Test Company", | ||
"account": "Payment Account - _TC", | ||
"report_date": "2018-10-30", | ||
} | ||
) | ||
result = execute(filters) | ||
|
||
self.assertEqual(result[1][0].payment_entry, repayment_entry.name) | ||
|