mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-19 21:19:19 +00:00
refactor(test): make queries deterministic
This commit is contained in:
@@ -14,15 +14,6 @@ def add_default_params(func, doctype):
|
|||||||
|
|
||||||
|
|
||||||
class TestQueries(ERPNextTestSuite):
|
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):
|
def assert_nested_in(self, item, container):
|
||||||
self.assertIn(item, [vals for tuples in container for vals in tuples])
|
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 = {
|
params = {
|
||||||
"doctype": "Employee",
|
"doctype": "Employee",
|
||||||
"txt": "",
|
"txt": "",
|
||||||
|
|||||||
Reference in New Issue
Block a user