
Tests for http://plone.org/collector/4981
-----------------------------------------

BaseObject.__bobo_traverse__ intercepts GET and POST, but not HEAD.

  >>> portal = layer['portal']
  >>> portal_name = portal.getId()
  >>> from plone.app.testing import setRoles
  >>> from plone.app.testing import TEST_USER_ID
  >>> from plone.app.testing import TEST_USER_NAME as user_name
  >>> from plone.app.testing import TEST_USER_PASSWORD as user_password
  >>> setRoles(portal, TEST_USER_ID, ['Manager'])
  >>> ignored = portal.invokeFactory('DDocument', 'test_document')
  >>> ignored = portal.invokeFactory('SimpleFolder', 'simple_folder')
  >>> ignored = portal.invokeFactory('SimpleBTreeFolder', 'simple_btree_folder')

  >>> from Testing.ZopeTestCase.zopedoctest.functional import http
  >>> from Testing.ZopeTestCase.sandbox import AppZapper 
  >>> AppZapper().set(layer['app'])
  >>> print http(r"""
  ... HEAD /%s/test_document HTTP/1...
  ... Authorization: Basic %s:%s
  ... """ % (portal_name, user_name, user_password))
  HTTP/1... 200 OK
  ...

  >>> print http(r"""
  ... HEAD /%s/simple_folder/test_document HTTP/1...
  ... Authorization: Basic %s:%s
  ... """ % (portal_name, user_name, user_password))
  HTTP/1... 200 OK
  ...

  >>> print http(r"""
  ... HEAD /%s/simple_btree_folder/test_document HTTP/1...
  ... Authorization: Basic %s:%s
  ... """ % (portal_name, user_name, user_password))
  HTTP/1... 200 OK
  ...

  >>> AppZapper().clear()
