[Zope-CVS] CVS: Products/ZCTextIndex/tests - testIndex.py:1.10

Casey Duncan casey@zope.com
Thu, 6 Jun 2002 15:48:26 -0400


Update of /cvs-repository/Products/ZCTextIndex/tests
In directory cvs.zope.org:/tmp/cvs-serv14938/tests

Modified Files:
	testIndex.py 
Log Message:
Added has_doc method to Index API.
Allows clean implementation of ZCTextIndex's unindex_object method so that it plays better with ZCatalog's unindex behavior.


=== Products/ZCTextIndex/tests/testIndex.py 1.9 => 1.10 ===
     def test_index_document(self, DOCID=1):
         doc = "simple document contains five words"
+        self.assert_(not self.index.has_doc(DOCID))
         self.index.index_doc(DOCID, doc)
+        self.assert_(self.index.has_doc(DOCID))
         self.assert_(self.index._docweight[DOCID])
         self.assertEqual(len(self.index._docweight), 1)
         self.assertEqual(len(self.index._wordinfo), 5)