Back to index

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

List of all members.

Public Member Functions

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

Public Attributes

 skins
 custom
 fsdir
 fsDTML

Detailed Description

Definition at line 109 of file test_FSDTMLMethod.py.


Member Function Documentation

Definition at line 111 of file test_FSDTMLMethod.py.

00111 
00112     def setUp( self ):
00113         FSDTMLMaker.setUp(self)
00114         SecurityTest.setUp( self )
00115 
00116         self.root._setObject( 'portal_skins', Folder( 'portal_skins' ) )
00117         self.skins = self.root.portal_skins
00118 
00119         self.skins._setObject( 'custom', Folder( 'custom' ) )
00120         self.custom = self.skins.custom
00121 
00122         self.skins._setObject( 'fsdir', Folder( 'fsdir' ) )
00123         self.fsdir = self.skins.fsdir
00124 
00125         self.fsdir._setObject( 'testDTML'
00126                              , self._makeOne( 'testDTML', 'testDTML.dtml' ) )
00127 
00128         self.fsDTML = self.fsdir.testDTML

Definition at line 181 of file test_FSDTMLMethod.py.

00181 
00182     def tearDown(self):
00183         SecurityTest.tearDown(self)
00184         FSDTMLMaker.tearDown(self)
00185 

Definition at line 129 of file test_FSDTMLMethod.py.

00129 
00130     def test_customize( self ):
00131 
00132         self.fsDTML.manage_doCustomize( folder_path='custom' )
00133 
00134         self.assertEqual( len( self.custom.objectIds() ), 1 )
00135         self.failUnless( 'testDTML' in self.custom.objectIds() )

Definition at line 136 of file test_FSDTMLMethod.py.

00136 
00137     def test_customize_alternate_root( self ):
00138 
00139         from OFS.Folder import Folder
00140 
00141         self.root.other = Folder('other')
00142 
00143         self.fsDTML.manage_doCustomize( folder_path='other', root=self.root )
00144 
00145         self.failIf( 'testDTML' in self.custom.objectIds() )
00146         self.failUnless( 'testDTML' in self.root.other.objectIds() )

Definition at line 165 of file test_FSDTMLMethod.py.

00165 
00166     def test_customize_caching(self):
00167         # Test to ensure that cache manager associations survive customizing
00168         cache_id = 'gofast'
00169         RAMCacheManager.manage_addRAMCacheManager( self.root
00170                                                  , cache_id
00171                                                  , REQUEST=None
00172                                                  )
00173         self.fsDTML.ZCacheable_setManagerId(cache_id, REQUEST=None)
00174 
00175         self.assertEqual(self.fsDTML.ZCacheable_getManagerId(), cache_id)
00176 
00177         self.fsDTML.manage_doCustomize(folder_path='custom')
00178         custom_pt = self.custom.testDTML
00179 
00180         self.assertEqual(custom_pt.ZCacheable_getManagerId(), cache_id)

Definition at line 147 of file test_FSDTMLMethod.py.

00147 
00148     def test_customize_fspath_as_dot( self ):
00149 
00150         self.fsDTML.manage_doCustomize( folder_path='.' )
00151 
00152         self.failIf( 'testDTML' in self.custom.objectIds() )
00153         self.failUnless( 'testDTML' in self.skins.objectIds() )

Definition at line 154 of file test_FSDTMLMethod.py.

00154 
00155     def test_customize_manual_clone( self ):
00156 
00157         from OFS.Folder import Folder
00158 
00159         clone = Folder('testDTML')
00160 
00161         self.fsDTML.manage_doCustomize( folder_path='custom', obj=clone )
00162 
00163         self.failUnless( 'testDTML' in self.custom.objectIds() )
00164         self.failUnless( aq_base(self.custom._getOb('testDTML')) is clone)


Member Data Documentation

Definition at line 119 of file test_FSDTMLMethod.py.

Definition at line 122 of file test_FSDTMLMethod.py.

Definition at line 127 of file test_FSDTMLMethod.py.

Definition at line 116 of file test_FSDTMLMethod.py.


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