refactor(test): hardcoded names over dynamic ones

Much faster bootstrap without those get_doc calls
This commit is contained in:
ruthra kumar
2026-03-01 21:33:45 +05:30
parent 5a4a77f5d2
commit e67165d6ce
26 changed files with 67 additions and 58 deletions

View File

@@ -2992,9 +2992,18 @@ class ERPNextTestSuite(unittest.TestCase):
return decorator
@classmethod
def setUpClass(cls):
cls.globalTestRecords = {}
def tearDown(self):
frappe.db.rollback()
def load_test_records(self, doctype):
if doctype not in self.globalTestRecords:
records = load_test_records_for(doctype)
self.globalTestRecords[doctype] = records[doctype]
@contextmanager
def set_user(self, user: str):
try: