Hi,

It seems that an integration test written using ZopeTestCase (and 
PloneTestCase) does not support using zope.security.checkPermission().

The problem is that the interaction threadlocal isn't set up, so you get 
an AttributeError.

It's easy to fix: just call Products.Five.security.newInteraction() 
before the test is run.

Is this something that should go into ZopeTestCase's setUp()?

Cheers,
Martin

-- 
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book

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

Reply via email to