[Zope3-checkins] CVS: Zope3/src/zope/app/catalog/tests - test_catalog.py:1.4

Andy Hird andyh@ekit-inc.com
Sun, 13 Jul 2003 01:51:58 -0400


Update of /cvs-repository/Zope3/src/zope/app/catalog/tests
In directory cvs.zope.org:/tmp/cvs-serv24050/src/zope/app/catalog/tests

Modified Files:
	test_catalog.py 
Log Message:
Index-Interface-Geddon. Moving all the index interfaces to 
zope.index.interfaces

As part of this we removed several duplicate interfaces and cleaned up
some existing ones. Most users of index interfaces should only need
zope.index.interfaces.index


=== Zope3/src/zope/app/catalog/tests/test_catalog.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/catalog/tests/test_catalog.py:1.3	Sun Jul 13 00:17:54 2003
+++ Zope3/src/zope/app/catalog/tests/test_catalog.py	Sun Jul 13 01:50:54 2003
@@ -27,12 +27,13 @@
 from zope.app.interfaces.catalog.index import ICatalogIndex
 from zope.app.interfaces.event import ISubscriber
 from zope.app.interfaces.services.hub import IObjectHub
-from zodb.btrees.IIBTree import IISet
+from zope.index.interfaces.index import IQuerying
 
 from zope.app.catalog.catalog import Catalog
 from zope.app.tests.placelesssetup import PlacelessSetup
 from zope.component import getServiceManager
 from zope.app.services.servicenames import HubIds
+from zodb.btrees.IIBTree import IISet
 
 from zope.app.index.tests.test_objectretrievingprocessor import FakeObjectHub
 
@@ -51,7 +52,7 @@
         return gen(self.data.items())
 
 class StubIndex(object):
-    implements(ISubscriber, ICatalogIndex, IUIFieldCatalogIndex)
+    implements(IQuerying, ISubscriber, ICatalogIndex, IUIFieldCatalogIndex)
 
     def __init__(self, field_name, interface=None):
 	self._field_name = field_name
@@ -72,8 +73,8 @@
             d.setdefault(term, []).append(e.hubid)
         return d
 
-    def search(self, term):
-	termdict = self._getterms()
+    def query(self, term, start=0, count=None):
+        termdict = self._getterms()
         res = termdict.get(term, [])
         return IISet(res)