refactor: use cls.globalTestRecords instead of declaring test_records

This commit is contained in:
David
2024-10-11 04:58:12 +02:00
parent d8b0b92925
commit 56c99fe7e1
32 changed files with 220 additions and 284 deletions

View File

@@ -11,8 +11,11 @@ def add_default_params(func, doctype):
return partial(func, doctype=doctype, txt="", searchfield="name", start=0, page_len=20, filters=None)
EXTRA_TEST_RECORD_DEPENDENCIES = ["Employee", "Lead", "Item", "BOM", "Project", "Account"]
class TestQueries(IntegrationTestCase):
# All tests are based on doctype/test_records.json
# All tests are based on self.globalTestRecords[doctype]
def assert_nested_in(self, item, container):
self.assertIn(item, [vals for tuples in container for vals in tuples])