Commit b8849ab2 authored by Hanno Schlichting's avatar Hanno Schlichting

Fixed test failures in forms.txt.

parent 104751ab
...@@ -35,6 +35,7 @@ from zope.app.container.interfaces import IContainerNamesContainer ...@@ -35,6 +35,7 @@ from zope.app.container.interfaces import IContainerNamesContainer
from zope.app.container.constraints import checkFactory, checkObject from zope.app.container.constraints import checkFactory, checkObject
from zope.app.publisher.browser.menu import getMenu from zope.app.publisher.browser.menu import getMenu
from Acquisition import aq_inner
from zExceptions import BadRequest from zExceptions import BadRequest
from OFS.SimpleItem import SimpleItem from OFS.SimpleItem import SimpleItem
...@@ -205,6 +206,16 @@ class ContentAdding(Adding, SimpleItem): ...@@ -205,6 +206,16 @@ class ContentAdding(Adding, SimpleItem):
menu_id = "add_content" menu_id = "add_content"
def __getParent(self):
# This class is based on Acquisition and accesses self.context
# We need to call aq_inner on it, or we get a funky aq_chain
return getattr(self, '_parent', aq_inner(self.context))
def __setParent(self, parent):
self._parent = parent
__parent__ = property(__getParent, __setParent)
class ObjectManagerNameChooser: class ObjectManagerNameChooser:
"""A name chooser for a Zope object manager. """A name chooser for a Zope object manager.
""" """
......
...@@ -24,7 +24,6 @@ Let's set up a testbrowser: ...@@ -24,7 +24,6 @@ Let's set up a testbrowser:
>>> from Products.Five.testbrowser import Browser >>> from Products.Five.testbrowser import Browser
>>> browser = Browser() >>> browser = Browser()
>>> browser.handleErrors = False
>>> browser.addHeader('Accept-Language', 'en-US') >>> browser.addHeader('Accept-Language', 'en-US')
Add forms Add forms
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment