mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-24 05:32:46 +01:00
refactor(test): make queries deterministic
This commit is contained in:
@@ -14,15 +14,6 @@ def add_default_params(func, doctype):
|
||||
|
||||
|
||||
class TestQueries(ERPNextTestSuite):
|
||||
# All tests are based on self.globalTestRecords[doctype]
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
cls.make_employees()
|
||||
cls.make_leads()
|
||||
cls.make_projects()
|
||||
|
||||
def assert_nested_in(self, item, container):
|
||||
self.assertIn(item, [vals for tuples in container for vals in tuples])
|
||||
|
||||
@@ -115,7 +106,7 @@ class TestQueries(ERPNextTestSuite):
|
||||
}
|
||||
)
|
||||
|
||||
with ERPNextTestSuite.set_user(user.name):
|
||||
with ERPNextTestSuite.set_user(self, user.name):
|
||||
params = {
|
||||
"doctype": "Employee",
|
||||
"txt": "",
|
||||
|
||||
Reference in New Issue
Block a user