def METHOD_NAME(self):
    # Based on Testing.ZopeTestCase.testFunctional
    basic_auth = f'{user_name}:{user_password}'
    self.folder.addDTMLDocument('secret_html', file='secret')
    self.folder.secret_html.manage_permission(view, ['Owner'])
    path = '/' + self.folder.absolute_url(1) + '/secret_html'
    # Test direct publishing
    response = self.publish(path + '/secret_html')
    self.assertEqual(response.getStatus(), 401)
    response = self.publish(path + '/secret_html', basic_auth)
    self.assertEqual(response.getStatus(), 200)
    self.assertEqual(response.getBody(), b'secret')
    # Test browser
    url = 'http://localhost' + path
    browser = Browser()
    browser.raiseHttpErrors = False
    browser.open(url)
    self.assertTrue(browser.headers['status'].startswith('401'))
    browser.login(user_name, user_password)
    browser.open(url)
    self.assertTrue(browser.headers['status'].startswith('200'))
    self.assertEqual(browser.contents, 'secret')