[CMF-checkins] CVS: CMF/CMFCore/tests - test_TypesTool.py:1.26

Yvo Schubbe schubbe@web.de
Thu, 31 Jul 2003 11:47:29 -0400


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

Modified Files:
	test_TypesTool.py 
Log Message:
Fixed bug in _guessMethodAliases:
Don't complain if we can't simulate _getViewFor behavior. There are CMF 1.4 content types that don't depend on _getViewFor.

=== CMF/CMFCore/tests/test_TypesTool.py 1.25 => 1.26 ===
--- CMF/CMFCore/tests/test_TypesTool.py:1.25	Tue Jul 15 11:50:44 2003
+++ CMF/CMFCore/tests/test_TypesTool.py	Thu Jul 31 11:47:23 2003
@@ -43,6 +43,7 @@
 from Products.CMFCore.tests.base.tidata import FTIDATA_CMF14
 from Products.CMFCore.tests.base.tidata import FTIDATA_CMF14_FOLDER
 from Products.CMFCore.tests.base.tidata import FTIDATA_CMF14_SPECIAL
+from Products.CMFCore.tests.base.tidata import FTIDATA_CMF14_SPECIAL2
 from Products.CMFCore.tests.base.tidata import FTIDATA_CMF15
 from Products.CMFCore.tests.base.tidata import FTIDATA_DUMMY
 from Products.CMFCore.tests.base.tidata import STI_SCRIPT
@@ -376,6 +377,21 @@
 
         # use old FTI Data
         ti = self._makeInstance( **FTIDATA_CMF14_SPECIAL[0] )
+        self.assertEqual(ti._aliases, wanted)
+
+        # simulate old FTI
+        del ti._aliases
+        self.failIf( hasattr(ti, '_aliases') )
+
+        # migrate FTI
+        ti.getMethodPath('view')
+        self.assertEqual(ti._aliases, wanted)
+
+    def test_CMF14_special2_migration(self):
+        wanted = {}
+
+        # use old FTI Data
+        ti = self._makeInstance( **FTIDATA_CMF14_SPECIAL2[0] )
         self.assertEqual(ti._aliases, wanted)
 
         # simulate old FTI