[Zope-CVS] CVS: Products/PathIndexNG/tests - testPathIndexNG.py:1.3
Andreas Jung
andreas at andreas-jung.com
Sat Jan 24 12:14:19 EST 2004
Update of /cvs-repository/Products/PathIndexNG/tests
In directory cvs.zope.org:/tmp/cvs-serv8661/tests
Modified Files:
testPathIndexNG.py
Log Message:
- update tests
- implemented _apply_index()
=== Products/PathIndexNG/tests/testPathIndexNG.py 1.2 => 1.3 ===
--- Products/PathIndexNG/tests/testPathIndexNG.py:1.2 Sat Jan 24 11:48:51 2004
+++ Products/PathIndexNG/tests/testPathIndexNG.py Sat Jan 24 12:14:16 2004
@@ -99,6 +99,20 @@
self._index.unindex_object(1)
+ def testSimpleTests(self):
+
+ self._populateIndex()
+ tests = [
+ ("/aa", [1,2,3,4,5,6,7,8,9]),
+ ("/bb", [10,11,12,13,14,15,16,17,18]),
+ ("/bb/cc", [16,17,18] ),
+ ("/bb/aa", [10,11,12] ),
+ ]
+
+ for path, expected in tests:
+ result = self._index._apply_index({"path" : {'query' : path}})
+ self.assertEqual(list(result[0].keys()), expected)
+
def test_suite():
return unittest.makeSuite( TestCase )
More information about the Zope-CVS
mailing list