[Zope3-Users] testing using placefulSetUp, zcml and events

Michael Howitz mh at gocept.com
Wed Jun 7 02:32:35 EDT 2006


Achim Domma wrote:
> Hi,
> 
> I have a content object I want to set up in a IObjectCreatedEvent event 
> handler. I want to use the interactive interpreter to play with this, 
> but it looks like my configure.zcml is not parsed and executed if I use 
> placefulSetUp.

This is correct, placefulSetUp is used in unittests.

> How do I have to setup my environment to test zcml configured events 
> from command line? Basically I want to write something like
> 
> some_setup_method()
> root["ws"]=Workspace() # should trigger and handle IObjectCreatedEvent
> for key in root["ws").keys():
>     print key
> 
> to check if the object is setup correctly.

What about starting Zope with
bin/zopectl debug
Zope starts like normal, but you get a python prompt.
There app.root() returns the root folder in the ZODB.

HTH,
  mac


More information about the Zope3-users mailing list