Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def testSetEnabled
def testSetCookable

Public Attributes

 tool

Detailed Description

Definition at line 796 of file testKSSRegistry.py.


Member Function Documentation

Definition at line 798 of file testKSSRegistry.py.

00798 
00799     def afterSetUp(self):
00800         self.tool = getattr(self.portal, KSSTOOLNAME)
00801         self.tool.clearResources()

Definition at line 819 of file testKSSRegistry.py.

00819 
00820     def testSetCookable(self):
00821         self.tool.registerKineticStylesheet('ham')
00822         self.tool.registerKineticStylesheet('spam')
00823         self.tool.registerKineticStylesheet('eggs')
00824         self.assertEqual(self.tool.concatenatedresources[
00825                          self.tool.cookedresources[0].getId()],
00826                          ['ham', 'spam', 'eggs'])
00827         spam = self.tool.getResource('spam')
00828         spam.setCookable(False)
00829         self.assertEqual(self.tool.concatenatedresources[
00830                          self.tool.cookedresources[0].getId()],
00831                          ['ham', 'spam', 'eggs'])
00832         self.tool.cookResources()
00833         self.assertEqual(self.tool.concatenatedresources[
00834                          self.tool.cookedresources[0].getId()],
00835                          ['ham'])
00836         self.assertEqual(self.tool.concatenatedresources[
00837                          self.tool.cookedresources[1].getId()],
00838                          ['spam'])
00839         self.assertEqual(self.tool.concatenatedresources[
00840                          self.tool.cookedresources[2].getId()],
00841                          ['eggs'])
00842 

Definition at line 802 of file testKSSRegistry.py.

00802 
00803     def testSetEnabled(self):
00804         self.tool.registerKineticStylesheet('ham')
00805         self.tool.registerKineticStylesheet('spam')
00806         self.tool.registerKineticStylesheet('eggs')
00807         self.assertEqual(self.tool.concatenatedresources[
00808                          self.tool.cookedresources[0].getId()],
00809                          ['ham', 'spam', 'eggs'])
00810         spam = self.tool.getResource('spam')
00811         spam.setEnabled(False)
00812         self.assertEqual(self.tool.concatenatedresources[
00813                          self.tool.cookedresources[0].getId()],
00814                          ['ham', 'spam', 'eggs'])
00815         self.tool.cookResources()
00816         self.assertEqual(self.tool.concatenatedresources[
00817                          self.tool.cookedresources[0].getId()],
00818                          ['ham', 'eggs'])


Member Data Documentation

Definition at line 799 of file testKSSRegistry.py.


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