Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def testGetItemTraversal
def testGetItemTraversalContent
def testRestrictedTraverseContent
def testRestrictedTraverseComposition
def testCompositesWithBrokedId

Public Attributes

 tool

Detailed Description

Definition at line 406 of file testKSSRegistry.py.


Member Function Documentation

Definition at line 408 of file testKSSRegistry.py.

00408 
00409     def afterSetUp(self):
00410         self.tool = getattr(self.portal, KSSTOOLNAME)
00411         self.tool.clearResources()
00412         self.tool.registerKineticStylesheet('test_rr_1.kss')

Definition at line 432 of file testKSSRegistry.py.

00432 
00433     def testCompositesWithBrokedId(self):
00434         self.tool.registerKineticStylesheet('nonexistant.kss')
00435         stylesheets = self.tool.getEvaluatedResources(self.portal)
00436         self.assertEqual(len(stylesheets), 1)
00437         magicId = stylesheets[0].getId()
00438         content = str(self.portal.restrictedTraverse('portal_kss/%s' % magicId))
00439 

Here is the call graph for this function:

Definition at line 413 of file testKSSRegistry.py.

00413 
00414     def testGetItemTraversal(self):
00415         self.failUnless(self.tool['test_rr_1.kss'])

Definition at line 416 of file testKSSRegistry.py.

00416 
00417     def testGetItemTraversalContent(self):
00418         self.failUnless('background-color' in str(self.tool['test_rr_1.kss']))

Definition at line 423 of file testKSSRegistry.py.

00423 
00424     def testRestrictedTraverseComposition(self):
00425         self.tool.registerKineticStylesheet('test_rr_2.kss')
00426         styles = self.tool.getEvaluatedResources(self.portal)
00427         self.assertEqual(len(styles), 1)
00428         magicId = styles[0].getId()
00429         content = str(self.portal.restrictedTraverse('portal_kss/%s' % magicId))
00430         self.failUnless('background-color' in content)
00431         self.failUnless('blue' in content)

Here is the call graph for this function:

Definition at line 419 of file testKSSRegistry.py.

00419 
00420     def testRestrictedTraverseContent(self):
00421         self.failUnless('background-color' in str(
00422                         self.portal.restrictedTraverse('portal_kss/test_rr_1.kss')))


Member Data Documentation

Definition at line 409 of file testKSSRegistry.py.


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