[CMF-checkins] CVS: CMF/CMFCore/tests - test_PortalFolder.py:1.29 test_WorkflowTool.py:1.8

Yvo Schubbe y.2004_ at wcm-solutions.de
Mon Mar 8 08:46:10 EST 2004


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

Modified Files:
	test_PortalFolder.py test_WorkflowTool.py 
Log Message:
- added getPortalTypeName to DynamicType interface
- marked _getPortalTypeName as deprecated alias


=== CMF/CMFCore/tests/test_PortalFolder.py 1.28 => 1.29 ===
--- CMF/CMFCore/tests/test_PortalFolder.py:1.28	Wed Feb  4 10:37:18 2004
+++ CMF/CMFCore/tests/test_PortalFolder.py	Mon Mar  8 08:46:09 2004
@@ -62,7 +62,7 @@
         self.failUnless( 'foo' in f.objectIds() )
         foo = f.foo
         self.assertEqual( foo.getId(), 'foo' )
-        self.assertEqual( foo._getPortalTypeName(), 'Dummy Content' )
+        self.assertEqual( foo.getPortalTypeName(), 'Dummy Content' )
         self.assertEqual( foo.Type(), 'Dummy Content Title' )
 
     def test_invokeFactory_disallowed_type( self ):
@@ -281,7 +281,7 @@
 
         # First, test default behavior
         test.manage_addFolder( id='simple', title='Simple' )
-        self.assertEqual( test.simple._getPortalTypeName(), 'Folder' )
+        self.assertEqual( test.simple.getPortalTypeName(), 'Folder' )
         self.assertEqual( test.simple.Type(), 'Folder or Directory' )
         self.assertEqual( test.simple.getId(), 'simple' )
         self.assertEqual( test.simple.Title(), 'Simple' )
@@ -304,7 +304,7 @@
         self.root.grabbed = Grabbed( test )
 
         test.manage_addFolder( id='indirect', title='Indirect' )
-        self.assertEqual( test.indirect._getPortalTypeName(), 'Grabbed' )
+        self.assertEqual( test.indirect.getPortalTypeName(), 'Grabbed' )
         self.assertEqual( test.indirect.Type(), 'Grabbed Content' )
         self.assertEqual( test.indirect.getId(), 'indirect' )
         self.assertEqual( test.indirect.Title(), 'Indirect' )


=== CMF/CMFCore/tests/test_WorkflowTool.py 1.7 => 1.8 ===
--- CMF/CMFCore/tests/test_WorkflowTool.py:1.7	Fri Jan  2 07:55:59 2004
+++ CMF/CMFCore/tests/test_WorkflowTool.py	Mon Mar  8 08:46:09 2004
@@ -100,7 +100,9 @@
 
     meta_type = 'Dummy'
     _isPortalContent = 1
-    def _getPortalTypeName(self): return 'Dummy Content'
+
+    def getPortalTypeName(self):
+        return 'Dummy Content'
 
 
 class DummyNotReallyContent( Dummy ):




More information about the CMF-checkins mailing list