Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def testGetItemTraversal
def testGetItemTraversalContent
def testRestrictedTraverseContent
def testRestrictedTraverseComposition
def testCompositesWithBrokenId

Public Attributes

 tool

Detailed Description

Definition at line 407 of file testJSRegistry.py.


Member Function Documentation

Definition at line 409 of file testJSRegistry.py.

00409 
00410     def afterSetUp(self):
00411         self.tool = getattr(self.portal, JSTOOLNAME)
00412         self.tool.clearResources()
00413         self.tool.registerScript('test_rr_1.js')

Definition at line 436 of file testJSRegistry.py.

00436 
00437     def testCompositesWithBrokenId(self):
00438         self.tool.registerScript('nonexistant.js')
00439         scripts = self.tool.getEvaluatedResources(self.portal)
00440         self.assertEqual(len(scripts), 1)
00441         magicId = scripts[0].getId()
00442         content = str(self.portal.restrictedTraverse('portal_javascripts/%s' % magicId))
00443 

Here is the call graph for this function:

Definition at line 414 of file testJSRegistry.py.

00414 
00415     def testGetItemTraversal(self):
00416         self.failUnless(self.tool['test_rr_1.js'])

Definition at line 417 of file testJSRegistry.py.

00417 
00418     def testGetItemTraversalContent(self):
00419         self.failUnless('running' in str(
00420                         self.tool['test_rr_1.js']))

Definition at line 426 of file testJSRegistry.py.

00426 
00427     def testRestrictedTraverseComposition(self):
00428         self.tool.registerScript('test_rr_2.css')
00429         scripts = self.tool.getEvaluatedResources(self.portal)
00430         self.assertEqual(len(scripts), 1)
00431         magicId = scripts[0].getId()
00432         content = str(self.portal.restrictedTraverse('portal_javascripts/%s' % magicId))
00433         # XXX: Review
00434         #self.failUnless('test_rr_1.js' in content)
00435         #self.failUnless('registerPloneFunction' in content)

Here is the call graph for this function:

Definition at line 421 of file testJSRegistry.py.

00421 
00422     def testRestrictedTraverseContent(self):
00423         self.failUnless('running' in str(
00424                         self.portal.restrictedTraverse(
00425                             'portal_javascripts/test_rr_1.js')))


Member Data Documentation

Definition at line 410 of file testJSRegistry.py.


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