[Zope3-checkins] CVS: Zope3/src/zope/fieldindex/tests - test_fieldindex.py:1.2

Andreas Jung andreas@andreas-jung.com
Wed, 26 Mar 2003 05:53:09 -0500


Update of /cvs-repository/Zope3/src/zope/fieldindex/tests
In directory cvs.zope.org:/tmp/cvs-serv21634/tests

Modified Files:
	test_fieldindex.py 
Log Message:
- minor cleanup
- added support for has_doc()


=== Zope3/src/zope/fieldindex/tests/test_fieldindex.py 1.1 => 1.2 ===
--- Zope3/src/zope/fieldindex/tests/test_fieldindex.py:1.1	Wed Mar 26 05:32:20 2003
+++ Zope3/src/zope/fieldindex/tests/test_fieldindex.py	Wed Mar 26 05:53:09 2003
@@ -51,6 +51,18 @@
         self.assertEqual(self.index.documentCount(), 0)
 
 
+    def test_hasdoc(self):
+    
+        self._populate_index()
+        self.assertEqual(self.index.has_doc(1), 1)
+        self.assertEqual(self.index.has_doc(2), 1)
+        self.assertEqual(self.index.has_doc(3), 1)
+        self.assertEqual(self.index.has_doc(4), 1)
+        self.assertEqual(self.index.has_doc(5), 1)
+        self.assertEqual(self.index.has_doc(99), 0)
+
+
+
     def test_indexdoc(self):
 
         self._populate_index()