[CMF-checkins] CVS: CMF/CMFCore/tests - test_PortalFolder.py:1.28

Yvo Schubbe y.2004_ at wcm-solutions.de
Wed Feb 4 10:37:19 EST 2004


Update of /cvs-repository/CMF/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv13895/CMFCore/tests

Modified Files:
	test_PortalFolder.py 
Log Message:
- fixed tests to work without 'id' index


=== CMF/CMFCore/tests/test_PortalFolder.py 1.27 => 1.28 ===
--- CMF/CMFCore/tests/test_PortalFolder.py:1.27	Sat Jan 31 15:34:04 2004
+++ CMF/CMFCore/tests/test_PortalFolder.py	Wed Feb  4 10:37:18 2004
@@ -212,7 +212,7 @@
         sub._setObject( 'foo', DummyContent( 'foo', catalog=1 ) )
         foo = sub.foo
         assert len( catalog ) == 1
-        assert 'foo' in catalog.uniqueValuesFor( 'id' )
+        self.failUnless( 'foo' in catalog.uniqueValuesFor('getId') )
         assert has_path( catalog._catalog, '/test/folder/sub/foo' )
 
         # WAAAA! must get _p_jar set
@@ -221,13 +221,13 @@
             folder.manage_renameObject( id='sub', new_id='new_sub' )
         finally:
             sub._p_jar = old
-        assert 'foo' in catalog.uniqueValuesFor( 'id' )
+        self.failUnless( 'foo' in catalog.uniqueValuesFor('getId') )
         assert len( catalog ) == 1
         assert has_path( catalog._catalog, '/test/folder/new_sub/foo' )
 
         folder._setObject( 'bar', DummyContent( 'bar', catalog=1 ) )
         bar = folder.bar
-        assert 'bar' in catalog.uniqueValuesFor( 'id' )
+        self.failUnless( 'bar' in catalog.uniqueValuesFor('getId') )
         assert len( catalog ) == 2
         assert has_path( catalog._catalog, '/test/folder/bar' )
 
@@ -246,8 +246,8 @@
         finally:
             bar._p_jar = old
 
-        assert 'foo' in catalog.uniqueValuesFor( 'id' )
-        assert 'bar' in catalog.uniqueValuesFor( 'id' )
+        self.failUnless( 'foo' in catalog.uniqueValuesFor('getId') )
+        self.failUnless( 'bar' in catalog.uniqueValuesFor('getId') )
         assert len( catalog ) == 2
         assert has_path( catalog._catalog, '/test/folder/sub2/bar' )
 




More information about the CMF-checkins mailing list