refactor(test): make opportunity summary by sales stage deterministic

This commit is contained in:
ruthra kumar
2026-02-12 15:17:44 +05:30
parent ed099bcd85
commit 4777b060ba
3 changed files with 21 additions and 23 deletions

View File

@@ -162,6 +162,12 @@ class ERPNextTestSuite(unittest.TestCase):
update_salutations()
records = get_preset_records("India")
from erpnext.setup.setup_wizard.operations.install_fixtures import read_lines
for doctype, title_field, filename in (("UTM Source", "name", "marketing_source.txt"),):
records += [{"doctype": doctype, title_field: title} for title in read_lines(filename)]
presets_primary_key_map = {
"Address Template": "country",
"Item Group": "item_group_name",
@@ -973,6 +979,14 @@ class ERPNextTestSuite(unittest.TestCase):
"enable_perpetual_inventory": 0,
"parent_company": "Parent Group Company India",
},
{
"abbr": "BT",
"company_name": "Best Test",
"country": "India",
"default_currency": "INR",
"doctype": "Company",
"chart_of_accounts": "Standard",
},
]
cls.companies = []
for x in records:
@@ -2526,6 +2540,13 @@ class ERPNextTestSuite(unittest.TestCase):
"doctype": "Customer",
"territory": "_Test Territory",
},
{
"customer_group": "_Test Customer Group",
"customer_name": "_Test NC",
"customer_type": "Individual",
"doctype": "Customer",
"territory": "_Test Territory",
},
]
cls.customer = []
for x in records: