mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-14 18:51:21 +00:00
refactor(test): hardcoded names over dynamic ones
Much faster bootstrap without those get_doc calls
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user