chore: use frappe.in_test

This commit is contained in:
Sagar Vora
2025-06-17 21:28:21 +05:30
parent 153a70cd70
commit 7a482a6998
31 changed files with 48 additions and 48 deletions

View File

@@ -49,7 +49,7 @@ class VATAuditReport:
self.sa_vat_accounts = frappe.get_all(
"South Africa VAT Account", filters={"parent": self.filters.company}, pluck="account"
)
if not self.sa_vat_accounts and not frappe.flags.in_test and not frappe.flags.in_migrate:
if not self.sa_vat_accounts and not frappe.in_test and not frappe.flags.in_migrate:
link_to_settings = get_link_to_form(
"South Africa VAT Settings", "", label="South Africa VAT Settings"
)

View File

@@ -57,7 +57,7 @@ def get_tax_accounts(company):
tax_accounts_dict = frappe._dict()
tax_accounts_list = frappe.get_all("UAE VAT Account", filters={"parent": company}, fields=["Account"])
if not tax_accounts_list and not frappe.flags.in_test:
if not tax_accounts_list and not frappe.in_test:
frappe.throw(_('Please set Vat Accounts for Company: "{0}" in UAE VAT Settings').format(company))
for tax_account in tax_accounts_list:
for _account, name in tax_account.items():