Commit 303d014e authored by Gary Poster's avatar Gary Poster

I zigged when I should have zagged in my last checkins. The IITreeSet should...

I zigged when I should have zagged in my last checkins.  The IITreeSet should remain unadulterated in the TopicIndex results, and the tests should adjust.
parent c2146c7a
......@@ -11,13 +11,13 @@
#
##############################################################################
__version__ = '$Id: TopicIndex.py,v 1.16 2003/12/31 21:18:03 poster Exp $'
__version__ = '$Id: TopicIndex.py,v 1.17 2003/12/31 22:32:21 poster Exp $'
from Globals import Persistent, DTMLFile
from OFS.SimpleItem import SimpleItem
from zLOG import ERROR, LOG
from BTrees.OOBTree import OOBTree
from BTrees.IIBTree import IISet,intersection,union
from BTrees.IIBTree import IITreeSet,intersection,union
import FilteredSet
from Products.PluginIndexes import PluggableIndex
......@@ -100,9 +100,9 @@ class TopicIndex(Persistent, SimpleItem):
res = set_func(res,rows)
if res:
return res.keys(), (self.id,)
return res, (self.id,)
else:
return IISet(), (self.id,)
return IITreeSet(), (self.id,)
def uniqueValues(self,name=None, withLength=0):
""" needed to be consistent with the interface """
......
......@@ -35,7 +35,7 @@ class TestBase(unittest.TestCase):
def _search(self,query,operator,expected):
res = self.TI._apply_index({'topic':{'query':query,'operator':operator}})
rows = list(res[0])
rows = list(res[0].keys())
rows.sort()
expected.sort()
self.assertEqual(rows,expected,query)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment