Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
ResourceRegistries.tests.testJSRegistry.TestJSScriptRenaming Class Reference
Inheritance diagram for ResourceRegistries.tests.testJSRegistry.TestJSScriptRenaming:
Inheritance graph
[legend]
Collaboration diagram for ResourceRegistries.tests.testJSRegistry.TestJSScriptRenaming:
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 91 of file testJSRegistry.py.


Member Function Documentation

Definition at line 93 of file testJSRegistry.py.

00093 
00094     def afterSetUp(self):
00095         self.tool = getattr(self.portal, JSTOOLNAME)
00096         self.tool.clearResources()

Definition at line 115 of file testJSRegistry.py.

00115 
00116     def testDoubleRenaming(self):
00117         self.tool.registerScript('ham')
00118         self.tool.registerScript('spam')
00119         self.tool.registerScript('eggs')
00120         self.tool.renameResource('spam', 'bacon')
00121         self.assertRaises(ValueError, self.tool.renameResource, 'spam', 'bacon')
00122 

Definition at line 97 of file testJSRegistry.py.

00097 
00098     def testRenaming(self):
00099         self.tool.registerScript('ham')
00100         self.tool.registerScript('spam')
00101         self.tool.registerScript('eggs')
00102         self.assertEqual(self.tool.concatenatedresources[
00103                          self.tool.cookedresources[0].getId()],
00104                          ['ham', 'spam', 'eggs'])
00105         self.tool.renameResource('spam', 'bacon')
00106         self.assertEqual(self.tool.concatenatedresources[
00107                          self.tool.cookedresources[0].getId()],
00108                          ['ham', 'bacon', 'eggs'])

Definition at line 109 of file testJSRegistry.py.

00109 
00110     def testRenamingIdClash(self):
00111         self.tool.registerScript('ham')
00112         self.tool.registerScript('spam')
00113         self.tool.registerScript('eggs')
00114         self.assertRaises(ValueError, self.tool.renameResource, 'spam', 'eggs')


Member Data Documentation

Definition at line 94 of file testJSRegistry.py.


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