Re: [Zope-dev] ZopeTestCase and interactions

2009-07-28 Thread Hanno Schlichting
On Mon, Jul 27, 2009 at 2:57 AM, Martin Aspelioptilude+li...@gmail.com wrote: Hanno Schlichting wrote: The ZopeTestCase classes themselves don't set up any of the ZCML structure right now and I'd like to keep it that way. True. This isn't a ZCML, thing, though. :) The thread local itself is

[Zope-dev] ZopeTestCase and interactions

2009-07-26 Thread Martin Aspeli
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

Re: [Zope-dev] ZopeTestCase and interactions

2009-07-26 Thread Hanno Schlichting
On Sun, Jul 26, 2009 at 5:21 PM, Martin Aspelioptilude+li...@gmail.com wrote: 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

Re: [Zope-dev] ZopeTestCase and interactions

2009-07-26 Thread Martin Aspeli
Hanno Schlichting wrote: On Sun, Jul 26, 2009 at 5:21 PM, Martin Aspelioptilude+li...@gmail.com wrote: 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.