Hi there,

I have a problem testing PloneMailBoxer
I am using the Method added at the end

getter = self.getProperty('getter')
getterHandler = self.unrestrictedTraverse(getter, default=None)

Calling the method in a test case I allways get None.
In a real Plone setup it works fine.
can somebody tell me why that is so? (Or where to look for a solution)

thanks
Robert

  security.declareProtected('Access contents information', 'getValueFor')
  def getValueFor(self, key):
      # Returns value for property;
      # if available, a dynamic getter will be used

      # we can not use MailBoxers getValueFor since
      # it does not work with  skin elements on the FS
            getter = self.getProperty('getter')
      if getter:
          getterHandler = self.unrestrictedTraverse(getter, default=None)
          if getterHandler is not None:
              try:
                  result = getterHandler(key)
                  if result is not None:
                      return result
              except:
                      pass

      # Our stored properties are the default
      return self.getProperty(key)


_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to