diff --git a/src/plone/api/tests/test_content.py b/src/plone/api/tests/test_content.py index 1673f82e..eecb6846 100644 --- a/src/plone/api/tests/test_content.py +++ b/src/plone/api/tests/test_content.py @@ -915,10 +915,18 @@ def test_find(self): def test_untrestricted_find(self): """Test the finding of content in with unrestricted search.""" - # Find documents + # Search as Anonymous user + from plone.app.testing import logout + logout() + + # Find documents (unrestricted) documents = api.content.find(portal_type="Document", unrestricted=True) self.assertEqual(len(documents), 2) + # Find documents (restricted) + documents = api.content.find(portal_type="Document") + self.assertEqual(len(documents), 0) + def test_find_empty_query(self): """Make sure an empty query yields no results"""