Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def testStoringScript
def testDisallowingDuplicateIds
def testUnregisterScript

Public Attributes

 tool

Detailed Description

Definition at line 64 of file testJSRegistry.py.


Member Function Documentation

Definition at line 66 of file testJSRegistry.py.

00066 
00067     def afterSetUp(self):
00068         self.tool = getattr(self.portal, JSTOOLNAME)
00069         self.tool.clearResources()

Definition at line 79 of file testJSRegistry.py.

00079 
00080     def testDisallowingDuplicateIds(self):
00081         self.tool.registerScript('foo')
00082         self.assertRaises(ValueError, self.tool.registerScript, 'foo')

Definition at line 70 of file testJSRegistry.py.

00070 
00071     def testStoringScript(self):
00072         self.tool.registerScript('foo')
00073         self.assertEqual(len(self.tool.getResources()), 1)
00074         script = self.tool.getResources()[0]
00075         self.assertEqual(script.getId(), 'foo')
00076         self.assertEqual(script.getExpression(), '')
00077         self.assertEqual(script.getInline(), False)
00078         self.assertEqual(script.getEnabled(), True)

Definition at line 83 of file testJSRegistry.py.

00083 
00084     def testUnregisterScript(self):
00085         self.tool.registerScript('foo')
00086         self.assertEqual(len(self.tool.getResources()), 1)
00087         self.assertEqual(self.tool.getResources()[0].getId(), 'foo')
00088         self.tool.unregisterResource('foo')
00089         self.assertEqual(len(self.tool.getResources()), 0)
00090 


Member Data Documentation

Definition at line 67 of file testJSRegistry.py.


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