Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
ResourceRegistries.tests.testCSSRegistry.TestStylesheetRenaming Class Reference
Inheritance diagram for ResourceRegistries.tests.testCSSRegistry.TestStylesheetRenaming:
Inheritance graph
[legend]
Collaboration diagram for ResourceRegistries.tests.testCSSRegistry.TestStylesheetRenaming:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def afterSetUp
def testRenaming
def testRenamingIdClash
def testDoubleRenaming

Public Attributes

 tool

Detailed Description

Definition at line 126 of file testCSSRegistry.py.


Member Function Documentation

Definition at line 128 of file testCSSRegistry.py.

00128 
00129     def afterSetUp(self):
00130         self.tool = getattr(self.portal, CSSTOOLNAME)
00131         self.tool.clearResources()

Definition at line 150 of file testCSSRegistry.py.

00150 
00151     def testDoubleRenaming(self):
00152         self.tool.registerStylesheet('ham')
00153         self.tool.registerStylesheet('spam')
00154         self.tool.registerStylesheet('eggs')
00155         self.tool.renameResource('spam', 'bacon')
00156         self.assertRaises(ValueError, self.tool.renameResource, 'spam', 'bacon')
00157 

Definition at line 132 of file testCSSRegistry.py.

00132 
00133     def testRenaming(self):
00134         self.tool.registerStylesheet('ham')
00135         self.tool.registerStylesheet('spam')
00136         self.tool.registerStylesheet('eggs')
00137         self.assertEqual(self.tool.concatenatedresources[
00138                          self.tool.cookedresources[0].getId()],
00139                          ['ham', 'spam', 'eggs'])
00140         self.tool.renameResource('spam', 'bacon')
00141         self.assertEqual(self.tool.concatenatedresources[
00142                          self.tool.cookedresources[0].getId()],
00143                          ['ham', 'bacon', 'eggs'])

Definition at line 144 of file testCSSRegistry.py.

00144 
00145     def testRenamingIdClash(self):
00146         self.tool.registerStylesheet('ham')
00147         self.tool.registerStylesheet('spam')
00148         self.tool.registerStylesheet('eggs')
00149         self.assertRaises(ValueError, self.tool.renameResource, 'spam', 'eggs')


Member Data Documentation

Definition at line 129 of file testCSSRegistry.py.


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