def test_search_replace_control_panel_anonymous_unauthorized(self): app = self.layer["app"] browser = Browser(app) browser.handleErrors = False with self.assertRaises( Unauthorized): # Anonymous cannot access this page browser.open( "{}/@@collective.documentgenerator-searchreplacepanel".format( self.portal.absolute_url()))