fix(test): test case for project query
(cherry picked from commit 3349dde5e2
)
This commit is contained in:
parent
07e2901e4b
commit
1b8f572e80
@ -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])
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user