mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-17 02:26:33 +00:00
Merge pull request #53657 from ruthra-kumar/move_commits_inside_test_guard_clause
refactor(test): move remaining commits inside test guard
This commit is contained in:
@@ -926,7 +926,7 @@ def update_transactions_annual_history(company, commit=False):
|
||||
transactions_history = get_all_transactions_annual_history(company)
|
||||
frappe.db.set_value("Company", company, "transactions_annual_history", json.dumps(transactions_history))
|
||||
|
||||
if commit:
|
||||
if commit and not frappe.in_test:
|
||||
frappe.db.commit()
|
||||
|
||||
|
||||
@@ -935,7 +935,9 @@ def cache_companies_monthly_sales_history():
|
||||
for company in companies:
|
||||
update_company_monthly_sales(company)
|
||||
update_transactions_annual_history(company)
|
||||
frappe.db.commit()
|
||||
|
||||
if not frappe.in_test:
|
||||
frappe.db.commit()
|
||||
|
||||
|
||||
@frappe.whitelist()
|
||||
|
||||
@@ -180,5 +180,39 @@
|
||||
"default_currency": "ZAR",
|
||||
"doctype": "Company",
|
||||
"create_chart_of_accounts_based_on": "Standard Template"
|
||||
},
|
||||
{
|
||||
"abbr": "_TOIC",
|
||||
"company_name": "_Test Opening Invoice Company",
|
||||
"country": "Pakistan",
|
||||
"default_currency": "INR",
|
||||
"doctype": "Company",
|
||||
"create_chart_of_accounts_based_on": "Standard Template"
|
||||
},
|
||||
{
|
||||
"abbr": "TBC",
|
||||
"company_name": "Trial Balance Company",
|
||||
"country": "India",
|
||||
"default_currency": "INR",
|
||||
"doctype": "Company",
|
||||
"create_chart_of_accounts_based_on": "Standard Template"
|
||||
},
|
||||
{
|
||||
"abbr": "_TSS",
|
||||
"company_name": "_Test Support SLA",
|
||||
"country": "India",
|
||||
"default_currency": "INR",
|
||||
"doctype": "Company",
|
||||
"chart_of_accounts": "Standard",
|
||||
"create_chart_of_accounts_based_on": "Standard Template"
|
||||
},
|
||||
{
|
||||
"abbr": "TQC",
|
||||
"company_name": "Test Quality Company",
|
||||
"country": "India",
|
||||
"default_currency": "INR",
|
||||
"doctype": "Company",
|
||||
"chart_of_accounts": "Standard",
|
||||
"create_chart_of_accounts_based_on": "Standard Template"
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user