Skip to content

Commit

Permalink
fix: method name and company wise filter in accouts field
Browse files Browse the repository at this point in the history
  • Loading branch information
Nihantra-Patel committed Oct 10, 2024
1 parent 0dbc0c8 commit 6ca16b9
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions lending/loan_management/doctype/loan/test_loan.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
unpledge_security,
)
from lending.loan_management.doctype.loan_application.loan_application import (
create_loan_security_assignment_from_loan_application_from_loan_application,
create_loan_security_assignment_from_loan_application,
)
from lending.loan_management.doctype.loan_disbursement.loan_disbursement import (
get_disbursal_amount,
Expand Down Expand Up @@ -205,7 +205,7 @@ def test_loan_with_security(self):
loan_application = create_loan_application(
"_Test Company", self.applicant2, "Stock Loan", pledge, "Repay Over Number of Periods", 12
)
create_loan_security_assignment_from_loan_application_from_loan_application(loan_application)
create_loan_security_assignment_from_loan_application(loan_application)

loan = create_loan_with_security(
self.applicant2, "Stock Loan", "Repay Over Number of Periods", 12, loan_application
Expand All @@ -219,7 +219,7 @@ def test_loan_disbursement(self):
"_Test Company", self.applicant2, "Stock Loan", pledge, "Repay Over Number of Periods", 12
)

create_loan_security_assignment_from_loan_application_from_loan_application(loan_application)
create_loan_security_assignment_from_loan_application(loan_application)

loan = create_loan_with_security(
self.applicant2, "Stock Loan", "Repay Over Number of Periods", 12, loan_application
Expand Down Expand Up @@ -281,7 +281,7 @@ def test_sanctioned_amount_limit(self):
loan_application = create_loan_application(
"_Test Company", self.applicant3, "Demand Loan", pledge
)
create_loan_security_assignment_from_loan_application_from_loan_application(loan_application)
create_loan_security_assignment_from_loan_application(loan_application)
loan = create_demand_loan(
self.applicant3, "Demand Loan", loan_application, posting_date="2019-10-01"
)
Expand All @@ -299,7 +299,7 @@ def test_regular_loan_repayment(self):
loan_application = create_loan_application(
"_Test Company", self.applicant2, "Demand Loan", pledge
)
create_loan_security_assignment_from_loan_application_from_loan_application(loan_application)
create_loan_security_assignment_from_loan_application(loan_application)

loan = create_demand_loan(
self.applicant2, "Demand Loan", loan_application, posting_date="2019-10-01"
Expand Down Expand Up @@ -360,7 +360,7 @@ def test_loan_closure(self):
loan_application = create_loan_application(
"_Test Company", self.applicant2, "Demand Loan", pledge
)
create_loan_security_assignment_from_loan_application_from_loan_application(loan_application)
create_loan_security_assignment_from_loan_application(loan_application)
loan = create_demand_loan(
self.applicant2, "Demand Loan", loan_application, posting_date="2019-10-01"
)
Expand Down Expand Up @@ -416,7 +416,7 @@ def test_loan_repayment_for_term_loan(self):
loan_application = create_loan_application(
"_Test Company", self.applicant2, "Stock Loan", pledges, "Repay Over Number of Periods", 12
)
create_loan_security_assignment_from_loan_application_from_loan_application(loan_application)
create_loan_security_assignment_from_loan_application(loan_application)

loan = create_loan_with_security(
self.applicant2,
Expand Down Expand Up @@ -467,7 +467,7 @@ def test_security_shortfall(self):
"_Test Company", self.applicant2, "Stock Loan", pledges, "Repay Over Number of Periods", 12
)

create_loan_security_assignment_from_loan_application_from_loan_application(loan_application)
create_loan_security_assignment_from_loan_application(loan_application)

loan = create_loan_with_security(
self.applicant2, "Stock Loan", "Repay Over Number of Periods", 12, loan_application
Expand Down Expand Up @@ -505,7 +505,7 @@ def test_loan_security_release(self):
loan_application = create_loan_application(
"_Test Company", self.applicant2, "Demand Loan", pledge
)
create_loan_security_assignment_from_loan_application_from_loan_application(loan_application)
create_loan_security_assignment_from_loan_application(loan_application)

loan = create_demand_loan(
self.applicant2, "Demand Loan", loan_application, posting_date="2019-10-01"
Expand Down Expand Up @@ -565,7 +565,7 @@ def test_partial_loan_security_release(self):
loan_application = create_loan_application(
"_Test Company", self.applicant2, "Demand Loan", pledge
)
create_loan_security_assignment_from_loan_application_from_loan_application(loan_application)
create_loan_security_assignment_from_loan_application(loan_application)

loan = create_demand_loan(
self.applicant2, "Demand Loan", loan_application, posting_date="2019-10-01"
Expand Down Expand Up @@ -601,7 +601,7 @@ def test_sanctioned_loan_security_release(self):
loan_application = create_loan_application(
"_Test Company", self.applicant2, "Demand Loan", pledge
)
create_loan_security_assignment_from_loan_application_from_loan_application(loan_application)
create_loan_security_assignment_from_loan_application(loan_application)

loan = create_demand_loan(
self.applicant2, "Demand Loan", loan_application, posting_date="2019-10-01"
Expand Down Expand Up @@ -630,7 +630,7 @@ def test_disbursal_check_with_shortfall(self):
"_Test Company", self.applicant2, "Stock Loan", pledges, "Repay Over Number of Periods", 12
)

create_loan_security_assignment_from_loan_application_from_loan_application(loan_application)
create_loan_security_assignment_from_loan_application(loan_application)

loan = create_loan_with_security(
self.applicant2, "Stock Loan", "Repay Over Number of Periods", 12, loan_application
Expand Down Expand Up @@ -669,7 +669,7 @@ def test_disbursal_check_without_shortfall(self):
"_Test Company", self.applicant2, "Stock Loan", pledges, "Repay Over Number of Periods", 12
)

create_loan_security_assignment_from_loan_application_from_loan_application(loan_application)
create_loan_security_assignment_from_loan_application(loan_application)

loan = create_loan_with_security(
self.applicant2, "Stock Loan", "Repay Over Number of Periods", 12, loan_application
Expand All @@ -687,7 +687,7 @@ def test_pending_loan_amount_after_closure_request(self):
loan_application = create_loan_application(
"_Test Company", self.applicant2, "Demand Loan", pledge
)
create_loan_security_assignment_from_loan_application_from_loan_application(loan_application)
create_loan_security_assignment_from_loan_application(loan_application)

loan = create_demand_loan(
self.applicant2, "Demand Loan", loan_application, posting_date="2019-10-01"
Expand Down Expand Up @@ -737,7 +737,7 @@ def test_partial_unaccrued_interest_payment(self):
# loan_application = create_loan_application(
# "_Test Company", self.applicant2, "Demand Loan", pledge
# )
# create_loan_security_assignment_from_loan_application_from_loan_application(loan_application)
# create_loan_security_assignment_from_loan_application(loan_application)

# loan = create_demand_loan(
# self.applicant2, "Demand Loan", loan_application, posting_date="2019-10-01"
Expand Down Expand Up @@ -1294,7 +1294,7 @@ def create_secured_demand_loan(applicant, disbursement_amount=None):
pledge = [{"loan_security": "Test Security 1", "qty": 4000.00}]

loan_application = create_loan_application("_Test Company", applicant, "Demand Loan", pledge)
create_loan_security_assignment_from_loan_application_from_loan_application(loan_application)
create_loan_security_assignment_from_loan_application(loan_application)

loan = create_demand_loan(applicant, "Demand Loan", loan_application, posting_date="2019-10-01")
loan.submit()
Expand Down

0 comments on commit 6ca16b9

Please sign in to comment.