[Zope3-checkins] CVS: Zope3/src/zope/app/index/text/tests -
test_index.py:1.12.24.2
Jim Fulton
jim at zope.com
Mon Sep 15 14:13:06 EDT 2003
Update of /cvs-repository/Zope3/src/zope/app/index/text/tests
In directory cvs.zope.org:/tmp/cvs-serv15511/src/zope/app/index/text/tests
Modified Files:
Tag: parentgeddon-branch
test_index.py
Log Message:
Got lots of tests to pass.
Added a setitem helper function to be used to help satisfy container
contracts.
=== Zope3/src/zope/app/index/text/tests/test_index.py 1.12.24.1 => 1.12.24.2 ===
--- Zope3/src/zope/app/index/text/tests/test_index.py:1.12.24.1 Fri Sep 12 15:15:29 2003
+++ Zope3/src/zope/app/index/text/tests/test_index.py Mon Sep 15 14:12:35 2003
@@ -50,8 +50,8 @@
PlacefulSetup.setUp(self, site=True)
self.index = TextIndex()
self.rootFolder['myIndex'] = self.index
- self.object = FakeSearchableObject()
- self.rootFolder['bruce'] = self.object
+ 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[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