Back to index

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


Member Function Documentation

Definition at line 930 of file testCSSRegistry.py.

00930 
00931     def afterSetUp(self):
00932         self.tool = getattr(self.portal, CSSTOOLNAME)
00933         self.tool.clearResources()

Definition at line 951 of file testCSSRegistry.py.

00951 
00952     def testSetCookable(self):
00953         self.tool.registerStylesheet('ham')
00954         self.tool.registerStylesheet('spam')
00955         self.tool.registerStylesheet('eggs')
00956         self.assertEqual(self.tool.concatenatedresources[
00957                          self.tool.cookedresources[0].getId()],
00958                          ['ham', 'spam', 'eggs'])
00959         spam = self.tool.getResource('spam')
00960         spam.setCookable(False)
00961         self.assertEqual(self.tool.concatenatedresources[
00962                          self.tool.cookedresources[0].getId()],
00963                          ['ham', 'spam', 'eggs'])
00964         self.tool.cookResources()
00965         self.assertEqual(self.tool.concatenatedresources[
00966                          self.tool.cookedresources[0].getId()],
00967                          ['ham'])
00968         self.assertEqual(self.tool.concatenatedresources[
00969                          self.tool.cookedresources[1].getId()],
00970                          ['spam'])
00971         self.assertEqual(self.tool.concatenatedresources[
00972                          self.tool.cookedresources[2].getId()],
00973                          ['eggs'])
00974 

Definition at line 934 of file testCSSRegistry.py.

00934 
00935     def testSetEnabled(self):
00936         self.tool.registerStylesheet('ham')
00937         self.tool.registerStylesheet('spam')
00938         self.tool.registerStylesheet('eggs')
00939         self.assertEqual(self.tool.concatenatedresources[
00940                          self.tool.cookedresources[0].getId()],
00941                          ['ham', 'spam', 'eggs'])
00942         spam = self.tool.getResource('spam')
00943         spam.setEnabled(False)
00944         self.assertEqual(self.tool.concatenatedresources[
00945                          self.tool.cookedresources[0].getId()],
00946                          ['ham', 'spam', 'eggs'])
00947         self.tool.cookResources()
00948         self.assertEqual(self.tool.concatenatedresources[
00949                          self.tool.cookedresources[0].getId()],
00950                          ['ham', 'eggs'])


Member Data Documentation

Definition at line 931 of file testCSSRegistry.py.


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