From 8b763e96e3e25df016c7a685c49e23f699577cec Mon Sep 17 00:00:00 2001 From: AarDG10 Date: Tue, 28 Apr 2026 18:23:40 +0530 Subject: [PATCH] test: fix test to accomodate multi-db queries --- frappe/tests/test_db_query.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frappe/tests/test_db_query.py b/frappe/tests/test_db_query.py index 27f9a1b201..1a05897c9c 100644 --- a/frappe/tests/test_db_query.py +++ b/frappe/tests/test_db_query.py @@ -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]