Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
NuPlone.tests.testStyleInstallation.testSkinsTool Class Reference

List of all members.

Public Member Functions

def afterSetUp
def testSkinSelectionCreated
def testSkinPaths
def testSkinSelection
def testSkinFlexibility
def testCookiePersistance

Public Attributes

 tool

Detailed Description

Definition at line 14 of file testStyleInstallation.py.


Member Function Documentation

Definition at line 16 of file testStyleInstallation.py.

00016 
00017     def afterSetUp(self):
00018         self.tool = getattr(self.portal, 'portal_skins')

Test if the skin choice is peristant between sessions.

Definition at line 48 of file testStyleInstallation.py.

00048 
00049     def testCookiePersistance(self):
00050         """Test if the skin choice is peristant between sessions."""
00051         self.assertEqual(bool(self.tool.getCookiePersistence()),
00052                                                         PERSISTENTCOOKIE)

Test if the users can choose their skin.

Definition at line 44 of file testStyleInstallation.py.

00044 
00045     def testSkinFlexibility(self):
00046         """Test if the users can choose their skin."""
00047         self.assertEqual(self.tool.getAllowAny(), ALLOWSELECTION)

Test if the skin layers in the new skin were correctly added.

Definition at line 25 of file testStyleInstallation.py.

00025 
00026     def testSkinPaths(self):
00027         """Test if the skin layers in the new skin were correctly added."""
00028         skinsfoldernames = getSkinsFolderNames(GLOBALS)
00029         skins_dict = {}
00030         for skin in SKINSELECTIONS:
00031             skins_dict[skin['name']] = skin.get('layers', skinsfoldernames)
00032         for selection, layers in self.tool.getSkinPaths():
00033             if skins_dict.has_key(selection):
00034                 for specific_layer in skins_dict[selection]:
00035                     self.failUnless(specific_layer in layers)
00036             else:
00037                 for foldername in skinsfoldernames:
00038                     self.failIf(foldername in layers)

Test if the new skin was selected as default one.

Definition at line 39 of file testStyleInstallation.py.

00039 
00040     def testSkinSelection(self):
00041         """Test if the new skin was selected as default one."""
00042         if SELECTSKIN:
00043             self.assertEqual(self.tool.getDefaultSkin(), DEFAULTSKIN)

Test if a new skin exists in portal_skins.

Definition at line 19 of file testStyleInstallation.py.

00019 
00020     def testSkinSelectionCreated(self):
00021         """Test if a new skin exists in portal_skins."""
00022         for skin_selection in SKINSELECTIONS:
00023             self.failUnless(
00024                 skin_selection['name'] in self.tool.getSkinSelections())


Member Data Documentation

Definition at line 17 of file testStyleInstallation.py.


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