test: fix test to accomodate multi-db queries

This commit is contained in:
AarDG10 2026-04-28 18:23:40 +05:30
parent fd2661160e
commit 8b763e96e3

View file

@ -1238,8 +1238,14 @@ class TestDBQuery(IntegrationTestCase):
fields=fields,
).get_sql()
self.assertIn("LEFT JOIN `tabSelf Linked DocType` `tabSelf Linked DocType_parent_ref`", query)
self.assertIn("LEFT JOIN `tabSelf Linked DocType` `tabSelf Linked DocType_sibling_ref`", query)
self.assertIn(
self.normalize_sql("LEFT JOIN `tabSelf Linked DocType` `tabSelf Linked DocType_parent_ref`"),
self.normalize_sql(query),
)
self.assertIn(
self.normalize_sql("LEFT JOIN `tabSelf Linked DocType` `tabSelf Linked DocType_sibling_ref`"),
self.normalize_sql(query),
)
def test_select_star_expansion(self):
count = frappe.get_list("Language", [{"SUM": 1}, {"COUNT": "*"}], as_list=1, order_by=None)[0]