Skip to content

Commit

Permalink
Merge pull request #3672 from plone/modernize-testNavigationRootDoesN…
Browse files Browse the repository at this point in the history
…otOverrideExplicitPath

Modernize the test testNavigationRootDoesNotOverrideExplicitPath
  • Loading branch information
jensens authored Nov 7, 2022
2 parents d514294 + 300dd4e commit 472dd98
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Products/CMFPlone/tests/testQueryCatalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])

Expand Down

0 comments on commit 472dd98

Please sign in to comment.