Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
CMFCore.tests.test_FSPageTemplate.FSPageTemplateCustomizationTests Class Reference
Inheritance diagram for CMFCore.tests.test_FSPageTemplate.FSPageTemplateCustomizationTests:
Inheritance graph
[legend]
Collaboration diagram for CMFCore.tests.test_FSPageTemplate.FSPageTemplateCustomizationTests:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def setUp
def tearDown
def test_customize
def test_customize_alternate_root
def test_customize_fspath_as_dot
def test_customize_manual_clone
def test_customize_caching
def test_dontExpandOnCreation

Public Attributes

 skins
 custom
 fsdir
 fsPT

Detailed Description

Definition at line 155 of file test_FSPageTemplate.py.


Member Function Documentation

Definition at line 157 of file test_FSPageTemplate.py.

00157 
00158     def setUp(self):
00159         FSPTMaker.setUp(self)
00160         SecurityTest.setUp(self)
00161 
00162         self.root._setObject( 'portal_skins', Folder( 'portal_skins' ) )
00163         self.skins = self.root.portal_skins
00164 
00165         self.skins._setObject( 'custom', Folder( 'custom' ) )
00166         self.custom = self.skins.custom
00167 
00168         self.skins._setObject( 'fsdir', Folder( 'fsdir' ) )
00169         self.fsdir = self.skins.fsdir
00170 
00171         self.fsdir._setObject( 'testPT'
00172                              , self._makeOne( 'testPT', 'testPT.pt' ) )
00173 
00174         self.fsPT = self.fsdir.testPT

Definition at line 175 of file test_FSPageTemplate.py.

00175 
00176     def tearDown(self):
00177         cleanUp()
00178         SecurityTest.tearDown(self)
00179         FSPTMaker.tearDown(self)

Here is the call graph for this function:

Definition at line 180 of file test_FSPageTemplate.py.

00180 
00181     def test_customize( self ):
00182 
00183         self.fsPT.manage_doCustomize( folder_path='custom' )
00184 
00185         self.assertEqual( len( self.custom.objectIds() ), 1 )
00186         self.failUnless( 'testPT' in self.custom.objectIds() )

Definition at line 187 of file test_FSPageTemplate.py.

00187 
00188     def test_customize_alternate_root( self ):
00189 
00190         from OFS.Folder import Folder
00191         self.root.other = Folder('other')
00192 
00193         self.fsPT.manage_doCustomize( folder_path='other', root=self.root )
00194 
00195         self.failIf( 'testPT' in self.custom.objectIds() )  
00196         self.failUnless( 'testPT' in self.root.other.objectIds() )  

Definition at line 213 of file test_FSPageTemplate.py.

00213 
00214     def test_customize_caching(self):
00215         # Test to ensure that cache manager associations survive customizing
00216         cache_id = 'gofast'
00217         RAMCacheManager.manage_addRAMCacheManager( self.root
00218                                                  , cache_id
00219                                                  , REQUEST=None
00220                                                  )
00221         self.fsPT.ZCacheable_setManagerId(cache_id, REQUEST=None)
00222 
00223         self.assertEqual(self.fsPT.ZCacheable_getManagerId(), cache_id)
00224 
00225         self.fsPT.manage_doCustomize(folder_path='custom')
00226         custom_pt = self.custom.testPT
00227 
00228         self.assertEqual(custom_pt.ZCacheable_getManagerId(), cache_id)
00229 

Definition at line 197 of file test_FSPageTemplate.py.

00197 
00198     def test_customize_fspath_as_dot( self ):
00199 
00200         self.fsPT.manage_doCustomize( folder_path='.' )
00201 
00202         self.failIf( 'testPT' in self.custom.objectIds() )  
00203         self.failUnless( 'testPT' in self.skins.objectIds() )  

Definition at line 204 of file test_FSPageTemplate.py.

00204 
00205     def test_customize_manual_clone( self ):
00206 
00207         clone = Folder('testPT')
00208 
00209         self.fsPT.manage_doCustomize( folder_path='custom', obj=clone )
00210 
00211         self.failUnless( 'testPT' in self.custom.objectIds() )  
00212         self.failUnless( aq_base(self.custom._getOb('testPT')) is clone )  

Definition at line 230 of file test_FSPageTemplate.py.

00230 
00231     def test_dontExpandOnCreation( self ):
00232 
00233         self.fsPT.manage_doCustomize( folder_path='custom' )
00234 
00235         customized = self.custom.testPT
00236         self.failIf( customized.expand )
00237 


Member Data Documentation

Definition at line 165 of file test_FSPageTemplate.py.

Definition at line 168 of file test_FSPageTemplate.py.

Definition at line 173 of file test_FSPageTemplate.py.

Definition at line 162 of file test_FSPageTemplate.py.


The documentation for this class was generated from the following file: