[Zope-Checkins] CVS: Zope2 - testPathIndex.py:1.1.2.3
andreas@digicool.com
andreas@digicool.com
Wed, 16 May 2001 16:18:54 -0400 (EDT)
Update of /cvs-repository/Zope2/lib/python/Products/PluginIndexes/tests
In directory korak.digicool.com:/tmp/cvs-serv5677
Modified Files:
Tag: ajung-dropin-registry
testPathIndex.py
Log Message:
--- Updated File testPathIndex.py in package Zope2 --
--- testPathIndex.py 2001/05/16 20:11:49 1.1.2.2
+++ testPathIndex.py 2001/05/16 20:18:54 1.1.2.3
@@ -119,7 +119,7 @@
def setUp( self ):
"""
"""
- self._index = PathIndex( 'foo' )
+ self._index = PathIndex( 'path' )
self._values = {
1 : Dummy("/aa/aa/aa"),
2 : Dummy("/aa/aa/bb"),
@@ -150,7 +150,6 @@
for k, v in self._values.items():
self._index.index_object( k, v )
- print self._index.items()
def testEmpty( self ):
"Test an empty FieldIndex."
@@ -165,8 +164,13 @@
self._populateIndex()
- self._index._apply_index( {"path":"aa","path_level":0})
-
+ res= self._index._apply_index( {"path":"aa","path_level":0})
+ lst = list(res[0].keys())
+ assert lst==[1,2,3,4,5,6,7,8,9],res
+
+ res= self._index._apply_index( {"path":"bb","path_level":0})
+ lst = list(res[0].keys())
+ assert lst==[10,11,12,13,14,15,16,17,18],res
def test_suite():
return unittest.makeSuite( TestCase )