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

Jens Vagelpohl jens at dataflake.org
Wed Mar 9 16:33:01 EST 2005


Update of /cvs-repository/Products/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv29168/CMFCore/tests

Modified Files:
      Tag: CMF-1_5-branch
	test_PortalFolder.py 
Log Message:
- CMFCore.PortalFolder: Cataloging portal folders was prevented by
  overriding the typical indexing calls, but one of them was forgotten,
  so they still got cataloged.  (http://www.zope.org/Collectors/CMF/309)


=== Products/CMFCore/tests/test_PortalFolder.py 1.35.2.4 => 1.35.2.5 ===
--- Products/CMFCore/tests/test_PortalFolder.py:1.35.2.4	Thu Feb 17 16:17:33 2005
+++ Products/CMFCore/tests/test_PortalFolder.py	Wed Mar  9 16:33:01 2005
@@ -46,6 +46,7 @@
 from Products.CMFCore.tests.base.utils import has_path
 from Products.CMFCore.TypesTool import FactoryTypeInformation as FTI
 from Products.CMFCore.TypesTool import TypesTool
+from Products.CMFCore.WorkflowTool import WorkflowTool
 
 
 def extra_meta_types():
@@ -210,6 +211,19 @@
         self.failIf( foo.after_add_called )
         self.failUnless( foo.before_delete_called )
         self.assertEqual( len(ctool), 0 )
+
+    def test_portalfolder_cataloging(self):
+        #
+        # Test to ensure a portal folder itself is *not* cataloged upon
+        # instantiation (Tracker issue 309)
+        #
+        ttool = self.site._setObject( 'portal_types', TypesTool() )
+        ctool = self.site._setObject( 'portal_catalog', CatalogTool() )
+        wftool = self.site._setObject( 'portal_workflow', WorkflowTool() )
+        test = self._makeOne('test')
+        wftool.notifyCreated(test)
+        self.assertEqual( len(ctool), 0 )
+
 
     def test_tracker261(self):
 



More information about the CMF-checkins mailing list