Re: [Zope-dev] ZopeTestCase and interactions

2009-07-28 Thread Hanno Schlichting
On Mon, Jul 27, 2009 at 2:57 AM, Martin Aspeli 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 not. But without t

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 Aspeli > 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 so

Re: [Zope-dev] ZopeTestCase and interactions

2009-07-26 Thread Hanno Schlichting
On Sun, Jul 26, 2009 at 5:21 PM, Martin Aspeli 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 go into ZopeTestC

[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 Products.Five.security.newInterac