Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes
CMFCore.exportimport.tests.test_skins.exportSkinsToolTests Class Reference
Inheritance diagram for CMFCore.exportimport.tests.test_skins.exportSkinsToolTests:
Inheritance graph
[legend]
Collaboration diagram for CMFCore.exportimport.tests.test_skins.exportSkinsToolTests:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def test_empty
def test_normal
def setUp
def tearDown

Static Public Attributes

 layer = ExportImportZCMLLayer

Detailed Description

Definition at line 312 of file test_skins.py.


Member Function Documentation

Reimplemented from CMFCore.exportimport.tests.test_skins._DVRegistrySetup.

Definition at line 303 of file test_skins.py.

00303 
00304     def setUp(self):
00305         BaseRegistryTests.setUp(self)
00306         _DVRegistrySetup.setUp(self)

Reimplemented from CMFCore.exportimport.tests.test_skins._DVRegistrySetup.

Definition at line 307 of file test_skins.py.

00307 
00308     def tearDown(self):
00309         _DVRegistrySetup.tearDown(self)
00310         BaseRegistryTests.tearDown(self)
00311 

Definition at line 316 of file test_skins.py.

00316 
00317     def test_empty(self):
00318         from Products.CMFCore.exportimport.skins import exportSkinsTool
00319 
00320         site = self._initSite()
00321         context = DummyExportContext(site)
00322         exportSkinsTool(context)
00323 
00324         self.assertEqual(len(context._wrote), 1)
00325         filename, text, content_type = context._wrote[0]
00326         self.assertEqual(filename, 'skins.xml')
00327         self._compareDOM(text, _EMPTY_EXPORT)
00328         self.assertEqual(content_type, 'text/xml')

Here is the call graph for this function:

Definition at line 329 of file test_skins.py.

00329 
00330     def test_normal(self):
00331         from Products.CMFCore.exportimport.skins import exportSkinsTool
00332 
00333         _IDS = ('one', 'two', 'three')
00334         _PATHS = {'basic': 'one', 'fancy': 'three, two, one'}
00335 
00336         site = self._initSite(selections=_PATHS, ids=_IDS)
00337         tool = site.portal_skins
00338         tool.default_skin = 'basic'
00339         tool.request_varname = 'skin_var'
00340         tool.allow_any = True
00341         tool.cookie_persistence = True
00342 
00343         context = DummyExportContext(site)
00344         exportSkinsTool(context)
00345 
00346         self.assertEqual(len(context._wrote), 1)
00347         filename, text, content_type = context._wrote[0]
00348         self.assertEqual(filename, 'skins.xml')
00349         self._compareDOM(text, _NORMAL_EXPORT)
00350         self.assertEqual(content_type, 'text/xml')
00351 

Here is the call graph for this function:


Member Data Documentation

Definition at line 314 of file test_skins.py.


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