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

2006-06-06 Thread Michael Howitz

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
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


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

2006-06-05 Thread Achim Domma

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.


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.

regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users