[Zope3-checkins] CVS: Zope3/src/zope/app/index/text/tests -
test_index.py:1.13
Jim Fulton
jim at zope.com
Sun Sep 21 13:32:20 EDT 2003
Update of /cvs-repository/Zope3/src/zope/app/index/text/tests
In directory cvs.zope.org:/tmp/cvs-serv14176/src/zope/app/index/text/tests
Modified Files:
test_index.py
Log Message:
Changed to use __setitem__ rather than setObject
Object events no longer have locations.
=== Zope3/src/zope/app/index/text/tests/test_index.py 1.12 => 1.13 ===
--- Zope3/src/zope/app/index/text/tests/test_index.py:1.12 Sat Jun 7 02:37:27 2003
+++ Zope3/src/zope/app/index/text/tests/test_index.py Sun Sep 21 13:32:19 2003
@@ -49,9 +49,9 @@
def setUp(self):
PlacefulSetup.setUp(self, site=True)
self.index = TextIndex()
- self.rootFolder.setObject('myIndex', self.index)
- self.object = FakeSearchableObject()
- self.rootFolder.setObject('bruce', self.object)
+ self.rootFolder['myIndex'] = self.index
+ self.rootFolder['bruce'] = FakeSearchableObject()
+ self.object = self.rootFolder['bruce']
def assertPresent(self, word, docid):
results, total = self.index.query(word)
@@ -96,13 +96,12 @@
hub.subscribe(index, IRegistrationHubEvent)
hub.subscribe(index, IObjectModifiedHubEvent)
location = "/bruce"
- self.rootFolder.setObject(location, self.object)
hubid = hub.register(location)
self.assertPresent(Bruce, hubid)
self.object.texts = [Sheila]
- event = ObjectModifiedEvent(self.object, location)
+ event = ObjectModifiedEvent(self.object)
hub.notify(event)
self.assertPresent(Sheila, hubid)
self.assertAbsent(Bruce)
@@ -132,7 +131,7 @@
self.assertPresent(Bruce, hubid)
self.object.texts = [Sheila]
- event = ObjectModifiedEvent(self.object, location)
+ event = ObjectModifiedEvent(self.object)
hub.notify(event)
self.assertPresent(Bruce, hubid)
self.assertAbsent(Sheila)
More information about the Zope3-Checkins
mailing list