Back to index

plone3  3.1.7
Public Member Functions
CMFCore.tests.test_DirectoryView.DirectoryViewFolderTests Class Reference
Inheritance diagram for CMFCore.tests.test_DirectoryView.DirectoryViewFolderTests:
Inheritance graph
[legend]
Collaboration diagram for CMFCore.tests.test_DirectoryView.DirectoryViewFolderTests:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def setUp
def tearDown
def test_DirectoryViewMetadata
def test_DirectoryViewFolderDefault
def test_DirectoryViewFolderCustom

Detailed Description

Definition at line 246 of file test_DirectoryView.py.


Member Function Documentation

Definition at line 248 of file test_DirectoryView.py.

00248 
00249     def setUp(self):
00250         FSDVTest.setUp(self)
00251         self._registerDirectory(self)

Here is the call graph for this function:

Definition at line 252 of file test_DirectoryView.py.

00252 
00253     def tearDown(self):
00254         from Products.CMFCore import DirectoryView
00255         # This is nasty, but there is no way to unregister anything
00256         # right now...
00257         metatype_registry = DirectoryView._dirreg._meta_types
00258         if 'FOLDER' in metatype_registry.keys():
00259             del metatype_registry['FOLDER']
00260         FSDVTest.tearDown(self)

Definition at line 274 of file test_DirectoryView.py.

00274 
00275     def test_DirectoryViewFolderCustom(self):
00276         # Now we register a different class under the fake meta_type
00277         # "FOLDER" and test again...
00278         from Products.CMFCore.DirectoryView import registerMetaType
00279         registerMetaType('FOLDER', DummyDirectoryView)
00280 
00281         # In order to regenerate the FSDV data we need to remove and
00282         # register again, that way the newly registered meta_type is used
00283         self.ob._delObject('fake_skin')
00284         self._registerDirectory(self)
00285         testfolder = self.ob.fake_skin.test_directory
00286         self.failUnless(isinstance(testfolder, DummyDirectoryViewSurrogate))
00287 

Here is the call graph for this function:

Definition at line 267 of file test_DirectoryView.py.

00267 
00268     def test_DirectoryViewFolderDefault(self):
00269         # Test that a folder inside the fake skin really is of type
00270         # DirectoryViewSurrogate
00271         from Products.CMFCore.DirectoryView import DirectoryViewSurrogate
00272         testfolder = self.ob.fake_skin.test_directory
00273         self.failUnless(isinstance(testfolder, DirectoryViewSurrogate))

Definition at line 261 of file test_DirectoryView.py.

00261 
00262     def test_DirectoryViewMetadata(self):
00263         # Test to determine if metadata shows up correctly on a
00264         # FSDV that has a corresponding .metadata file
00265         testfolder = self.ob.fake_skin.test_directory
00266         self.assertEqual(testfolder.title, 'test_directory Title')


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