[Zope3-checkins] CVS: Zope3/src/zope/app/index - subscribers.py:1.9
R. Sean Bowman
sean.bowman@acm.org
Sun, 16 Mar 2003 18:20:00 -0500
Update of /cvs-repository/Zope3/src/zope/app/index
In directory cvs.zope.org:/tmp/cvs-serv22277
Modified Files:
subscribers.py
Log Message:
add tests for subscribers.Registration, change Registration to register
objects with the hub by location (easier for testing)
=== Zope3/src/zope/app/index/subscribers.py 1.8 => 1.9 ===
--- Zope3/src/zope/app/index/subscribers.py:1.8 Thu Feb 20 20:36:23 2003
+++ Zope3/src/zope/app/index/subscribers.py Sun Mar 16 18:19:30 2003
@@ -63,7 +63,7 @@
def notify(wrapped_self, event):
"""An event occured. Perhaps register this object with the hub."""
hub = getService(wrapped_self, HubIds)
- wrapped_self._registerObject(event.object, hub)
+ wrapped_self._registerObject(event.location, hub)
notify = ContextMethod(notify)
currentlySubscribed = False # Default subscription state
@@ -109,10 +109,10 @@
wrapped_self._registerTree(sub_object, hub)
_registerTree = ContextMethod(_registerTree)
- def _registerObject(wrapped_self, object, hub):
+ def _registerObject(wrapped_self, location, hub):
# XXX Policy decision: register absolutely everything
try:
- hub.register(object)
+ hub.register(location)
except ObjectHubError:
# Already registered
pass