[Zope-dev] Zope Tests: 3 OK, 5 Failed

2009-07-26 Thread Zope Tests Summarizer
Summary of messages to the zope-tests list.
Period Sat Jul 25 12:00:00 2009 UTC to Sun Jul 26 12:00:00 2009 UTC.
There were 8 messages: 8 from Zope Tests.


Test failures
-

Subject: FAILED (failures=1) : Zope-2.12 Python-2.6.2 : Linux
From: Zope Tests
Date: Sat Jul 25 20:50:31 EDT 2009
URL: http://mail.zope.org/pipermail/zope-tests/2009-July/012146.html

Subject: FAILED (failures=1) : Zope-2.12-alltests Python-2.4.6 : Linux
From: Zope Tests
Date: Sat Jul 25 20:52:31 EDT 2009
URL: http://mail.zope.org/pipermail/zope-tests/2009-July/012147.html

Subject: FAILED (failures=7) : Zope-2.12-alltests Python-2.6.2 : Linux
From: Zope Tests
Date: Sat Jul 25 20:54:31 EDT 2009
URL: http://mail.zope.org/pipermail/zope-tests/2009-July/012148.html

Subject: FAILED (failures=1) : Zope-trunk Python-2.6.2 : Linux
From: Zope Tests
Date: Sat Jul 25 20:56:31 EDT 2009
URL: http://mail.zope.org/pipermail/zope-tests/2009-July/012149.html

Subject: FAILED (failures=7) : Zope-trunk-alltests Python-2.6.2 : Linux
From: Zope Tests
Date: Sat Jul 25 20:58:31 EDT 2009
URL: http://mail.zope.org/pipermail/zope-tests/2009-July/012150.html


Tests passed OK
---

Subject: OK : Zope-2.10 Python-2.4.6 : Linux
From: Zope Tests
Date: Sat Jul 25 20:44:31 EDT 2009
URL: http://mail.zope.org/pipermail/zope-tests/2009-July/012143.html

Subject: OK : Zope-2.11 Python-2.4.6 : Linux
From: Zope Tests
Date: Sat Jul 25 20:46:31 EDT 2009
URL: http://mail.zope.org/pipermail/zope-tests/2009-July/012144.html

Subject: OK : Zope-2.12 Python-2.4.6 : Linux
From: Zope Tests
Date: Sat Jul 25 20:48:31 EDT 2009
URL: http://mail.zope.org/pipermail/zope-tests/2009-July/012145.html

___
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 )


[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.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 )


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 go into ZopeTestCase's setUp()?

The ZopeTestCase classes themselves don't set up any of the ZCML
structure right now and I'd like to keep it that way.

Isn't the placeless layer exactly for this use-case of getting some
minimal integration fixture set up? Since Zope 2.12 a Zope2 specific
version of that is in Testing.ZopeTestCase.placeless. Before you would
get it from zope.app.testing.placelesssetup.

The module in Testing.ZopeTestCase uses from zope.security.management
import newInteraction though and not Five. Maybe it should use the
Five version instead?

Hanno
___
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 )


[Zope-dev] Integrating Five code properly into Zope2?

2009-07-26 Thread Hanno Schlichting
Hi.

I'd like to push code and ZCML from Products.Five into the appropriate
places in Zope2.

For example event.zcml registering events for OFS items, should live
in the OFS package. i18n.zcml setting up stuff for the request or the
publisher should live in the ZPublisher package, security bridging
code for zope.security vs. AccessControl should go into AccessControl,
test setup and support code should live in Testing, ... startup code
and site.zcml handling should live in the Zope2.Startup package and so
on. There's probably some bridging code left in Five which has no real
place to go in Zope2. Like formlib wrapping / bridging code - I'd
leave this in Five for the time being until we get a clearer picture
of what is actually left in there.

Given our current deprecation policy, I'd leave indefinite backwards
compatibility imports in place and do the same for ZCML files. It
would be work targeted at the lucky numbered Zope 2.13 ;-)

Do people generally agree with this direction?

Hanno

P.S. Maybe this would allow one day to remove the Five package again
from the main Zope2 distribution, ... maybe :)
___
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 )


Re: [Zope-dev] Integrating Five code properly into Zope2?

2009-07-26 Thread Martin Aspeli
Hanno Schlichting wrote:
 Hi.
 
 I'd like to push code and ZCML from Products.Five into the appropriate
 places in Zope2.
 
 For example event.zcml registering events for OFS items, should live
 in the OFS package. i18n.zcml setting up stuff for the request or the
 publisher should live in the ZPublisher package, security bridging
 code for zope.security vs. AccessControl should go into AccessControl,
 test setup and support code should live in Testing, ... startup code
 and site.zcml handling should live in the Zope2.Startup package and so
 on. There's probably some bridging code left in Five which has no real
 place to go in Zope2. Like formlib wrapping / bridging code - I'd
 leave this in Five for the time being until we get a clearer picture
 of what is actually left in there.
 
 Given our current deprecation policy, I'd leave indefinite backwards
 compatibility imports in place and do the same for ZCML files. It
 would be work targeted at the lucky numbered Zope 2.13 ;-)
 
 Do people generally agree with this direction?

+1

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 )


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.

 Is this something that should go into ZopeTestCase's setUp()?
 
 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. :)

 Isn't the placeless layer exactly for this use-case of getting some
 minimal integration fixture set up? Since Zope 2.12 a Zope2 specific
 version of that is in Testing.ZopeTestCase.placeless. Before you would
 get it from zope.app.testing.placelesssetup.

I see. That sounds like a sensible place. My main aim is that when you 
use a PloneTestCase, you should get the interaction set up so that calls 
to zope.security.checkPermission() don't fail. Does PTC and other 
similar things set up the placeless layer? Or something like it?

 The module in Testing.ZopeTestCase uses from zope.security.management
 import newInteraction though and not Five. Maybe it should use the
 Five version instead?

Almost certainly.

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 )