fix(test): test case for project query

(cherry picked from commit 3349dde5e2)
This commit is contained in:
ruthra kumar 2024-01-16 14:28:09 +05:30 committed by Mergify
parent 07e2901e4b
commit 1b8f572e80
2 changed files with 2 additions and 2 deletions

View File

@ -350,7 +350,7 @@ def get_project_name(doctype, txt, searchfield, start, page_len, filters):
q = qb.from_(proj)
fields = get_fields("Project", ["name", "project_name"])
fields = get_fields(doctype, ["name", "project_name"])
for x in fields:
q = q.select(proj[x])

View File

@ -68,7 +68,7 @@ class TestQueries(unittest.TestCase):
self.assertGreaterEqual(len(query(txt="_Test Item Home Desktop Manufactured")), 1)
def test_project_query(self):
query = add_default_params(queries.get_project_name, "BOM")
query = add_default_params(queries.get_project_name, "Project")
self.assertGreaterEqual(len(query(txt="_Test Project")), 1)