[CMF-checkins] CVS: Products/CMFCore/tests - test_FSPageTemplate.py:1.14.14.2

Jens Vagelpohl jens at dataflake.org
Sat Dec 4 15:29:52 EST 2004


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

Modified Files:
      Tag: CMF-1_5-branch
	test_FSPageTemplate.py 
Log Message:
- FSObject: Ensure that a cache manager association on a Filesystem-based
  object in the Skins Tool gets applied to the customized object in the
  ZODB upon customization. (http://www.zope.org/Collectors/CMF/304)


=== Products/CMFCore/tests/test_FSPageTemplate.py 1.14.14.1 => 1.14.14.2 ===
--- Products/CMFCore/tests/test_FSPageTemplate.py:1.14.14.1	Fri Sep  3 14:01:10 2004
+++ Products/CMFCore/tests/test_FSPageTemplate.py	Sat Dec  4 15:29:52 2004
@@ -7,6 +7,7 @@
 
 from OFS.Folder import Folder
 from Products.PageTemplates.TALES import Undefined
+from Products.StandardCacheManagers import RAMCacheManager
 
 from Products.CMFCore.FSPageTemplate import FSPageTemplate
 from Products.CMFCore.tests.base.dummy import DummyCachingManager
@@ -113,6 +114,23 @@
 
         self.assertEqual( len( self.custom.objectIds() ), 1 )
         self.failUnless( 'testPT' in self.custom.objectIds() )
+
+    def test_customize_caching(self):
+        # Test to ensure that cache manager associations survive customizing
+        cache_id = 'gofast'
+        RAMCacheManager.manage_addRAMCacheManager( self.root
+                                                 , cache_id
+                                                 , REQUEST=None
+                                                 )
+        self.fsPT.ZCacheable_setManagerId(cache_id, REQUEST=None)
+
+        self.assertEqual(self.fsPT.ZCacheable_getManagerId(), cache_id)
+
+        self.fsPT.manage_doCustomize(folder_path='custom')
+        custom_pt = self.custom.testPT
+
+        self.assertEqual(custom_pt.ZCacheable_getManagerId(), cache_id)
+
 
     def test_dontExpandOnCreation( self ):
 



More information about the CMF-checkins mailing list