mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-16 07:58:38 +00:00
test: use a unique company abbreviation to fix COA-template flake
This commit is contained in:
@@ -68,7 +68,12 @@ class TestCompany(ERPNextTestSuite):
|
||||
try:
|
||||
company = frappe.new_doc("Company")
|
||||
company.company_name = template
|
||||
company.abbr = random_string(3)
|
||||
# a short random abbr collides with existing test companies often enough
|
||||
# to flake, so pick one that is verified unique
|
||||
abbr = random_string(3)
|
||||
while frappe.db.exists("Company", {"abbr": abbr}):
|
||||
abbr = random_string(3)
|
||||
company.abbr = abbr
|
||||
company.default_currency = "USD"
|
||||
company.create_chart_of_accounts_based_on = "Standard Template"
|
||||
company.chart_of_accounts = template
|
||||
|
||||
Reference in New Issue
Block a user