From b76706ac28c42cd8be9b118e85d0fbda6a85bfaa Mon Sep 17 00:00:00 2001 From: Sagar Vora <16315650+sagarvora@users.noreply.github.com> Date: Wed, 17 Dec 2025 19:30:32 +0530 Subject: [PATCH] test: improve single query test --- frappe/tests/test_perf.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/frappe/tests/test_perf.py b/frappe/tests/test_perf.py index bb300dfeaf..bcb4cfa448 100644 --- a/frappe/tests/test_perf.py +++ b/frappe/tests/test_perf.py @@ -166,13 +166,13 @@ class TestPerformance(IntegrationTestCase): self.assertEqual(get_build_version(), get_build_version()) def test_get_list_single_query(self): - """get_list should only perform single query.""" + """ + get_list should only perform single query. - user = frappe.get_doc("User", TEST_USER) - - frappe.set_user(TEST_USER) - # Give full read access, no share/user perm check should be done. - user.add_roles("System Manager") + Note: + this test will work only as Admistrator. + other users will have permission queries - so share conditions will be added. + """ frappe.get_list("User") with self.assertQueryCount(1):