chore: semgrep

(cherry picked from commit 581af4eced)
This commit is contained in:
Dany Robert
2024-04-05 18:16:26 +00:00
committed by Mergify
parent 186701b54f
commit c67be05280

View File

@@ -314,7 +314,6 @@ class TestDeferredRevenueAndExpense(FrappeTestCase, AccountsTestMixin):
pi.submit() pi.submit()
pda = frappe.get_doc( pda = frappe.get_doc(
dict(
doctype="Process Deferred Accounting", doctype="Process Deferred Accounting",
posting_date=nowdate(), posting_date=nowdate(),
start_date="2024-01-01", start_date="2024-01-01",
@@ -322,7 +321,6 @@ class TestDeferredRevenueAndExpense(FrappeTestCase, AccountsTestMixin):
type="Expense", type="Expense",
company=self.company, company=self.company,
) )
)
pda.insert() pda.insert()
pda.submit() pda.submit()
@@ -351,6 +349,6 @@ class TestDeferredRevenueAndExpense(FrappeTestCase, AccountsTestMixin):
self.assertTrue(inv) self.assertTrue(inv)
# calculate the total deferred expense for the period # calculate the total deferred expense for the period
inv = inv[0].calculate_invoice_revenue_expense_for_period() inv = inv[0].calculate_invoice_revenue_expense_for_period()
deferred_exp = sum([inv[idx].actual for idx in range(len(report.period_total))]) deferred_exp = sum([inv[idx].actual for idx in range(len(report.period_list))])
# make sure the total deferred expense is greater than 0 # make sure the total deferred expense is greater than 0
self.assertGreater(deferred_exp, 0) self.assertLess(deferred_exp, 0)