test: fix test for nested permission
This commit is contained in:
parent
e01b6ff4ec
commit
35581eb50b
1 changed files with 2 additions and 3 deletions
|
|
@ -566,8 +566,8 @@ class TestDBQuery(IntegrationTestCase):
|
|||
# to avoid if_owner filter
|
||||
update("Nested DocType", "All", 0, "if_owner", 0)
|
||||
|
||||
frappe.set_user("test2@example.com")
|
||||
data = DatabaseQuery("Nested DocType").execute()
|
||||
with self.set_user("test2@example.com"):
|
||||
data = DatabaseQuery("Nested DocType").execute()
|
||||
|
||||
# children of root folder (for which we added user permission) should be accessible
|
||||
self.assertTrue({"name": "Level 2 A"} in data)
|
||||
|
|
@ -577,7 +577,6 @@ class TestDBQuery(IntegrationTestCase):
|
|||
self.assertFalse({"name": "Level 1 B"} in data)
|
||||
self.assertFalse({"name": "Level 2 B"} in data)
|
||||
update("Nested DocType", "All", 0, "if_owner", 1)
|
||||
frappe.set_user("Administrator")
|
||||
|
||||
def test_filter_sanitizer(self):
|
||||
self.assertRaises(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue