From 57869c8c72b0bbeb0dc9602925312323a6cb6c26 Mon Sep 17 00:00:00 2001 From: ale-rt Date: Sun, 6 Nov 2022 12:06:27 +0100 Subject: [PATCH] Modernize the test testNavigationRootDoesNotOverrideExplicitPath The test was still assuming that the navigation root configuration is stored in the portal properties while it is in the registry since quite some time. Adapt the test to check that nothing breaks when tweaking the registry. Refs. #125 --- Products/CMFPlone/tests/testQueryCatalog.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Products/CMFPlone/tests/testQueryCatalog.py b/Products/CMFPlone/tests/testQueryCatalog.py index ab33de3a50..5657c6bc71 100644 --- a/Products/CMFPlone/tests/testQueryCatalog.py +++ b/Products/CMFPlone/tests/testQueryCatalog.py @@ -133,10 +133,14 @@ def testNavigationRoot(self): def testNavigationRootDoesNotOverrideExplicitPath(self): request = {'SearchableText': 'a*', 'path': '/yyy/zzz'} - ntp = self.portal.portal_properties.navtree_properties self.setRoles(('Manager',)) self.portal.invokeFactory('Folder', 'foo') - ntp.root = '/foo' + registry = getUtility(IRegistry) + navigation_settings = registry.forInterface( + INavigationSchema, + prefix='plone' + ) + navigation_settings.root = '/' qry = self.folder.queryCatalog(request, use_navigation_root=True) self.assertEqual('/yyy/zzz', qry['path'])