[Checkins] SVN: Zope/trunk/src/Products/ZCatalog/tests/test_zcatalog.py Added test for clearIndex

Hanno Schlichting hannosch at hannosch.eu
Sun Aug 1 09:25:45 EDT 2010


Log message for revision 115328:
  Added test for clearIndex
  

Changed:
  U   Zope/trunk/src/Products/ZCatalog/tests/test_zcatalog.py

-=-
Modified: Zope/trunk/src/Products/ZCatalog/tests/test_zcatalog.py
===================================================================
--- Zope/trunk/src/Products/ZCatalog/tests/test_zcatalog.py	2010-08-01 13:13:19 UTC (rev 115327)
+++ Zope/trunk/src/Products/ZCatalog/tests/test_zcatalog.py	2010-08-01 13:25:45 UTC (rev 115328)
@@ -143,6 +143,12 @@
 
         verifyClass(IZCatalog, ZCatalog)
 
+    def testClearIndex(self):
+        idx = self._catalog._catalog.getIndex('title')
+        self.assertEquals(len(idx), self.upper)
+        self._catalog.clearIndex('title')
+        self.assertEquals(len(idx), 0)
+
     def testGetMetadataForUID(self):
         testNum = str(self.upper - 3) # as good as any..
         data = self._catalog.getMetadataForUID(testNum)



More information about the checkins mailing list