[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/TopicIndex/test - testTopicIndex.py:1.1.2.5
Andreas Jung
andreas@zope.com
Thu, 18 Oct 2001 09:21:29 -0400
Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/TopicIndex/test
In directory cvs.zope.org:/tmp/cvs-serv21484/test
Modified Files:
Tag: ajung-topicindex
testTopicIndex.py
Log Message:
- code cleanup
- changed catalog tests
=== Zope/lib/python/Products/PluginIndexes/TopicIndex/test/testTopicIndex.py 1.1.2.4 => 1.1.2.5 ===
def _search(self,query,operator,expected):
- res = self.TI._apply_index({'topic':{'query':query,'operator':operator}})
- rows = list(res[0])
+ res = self.cat.searchResults({'topic':{'query':query,'operator':operator}})
+
+ rows = [int(x.id) for x in res ]
rows.sort()
- rows = [int(self.cat._catalog.paths[x]) for x in rows]
expected.sort()
if rows != expected:
@@ -125,7 +125,7 @@
print "expected: ",expected
raise AssertionError
- return rows
+ return rows,res
def test_suite():