Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def testPublishCSSThroughTool
def testPublishNonMagicCSSThroughTool

Public Attributes

 tool
 toolpath
 portalpath

Detailed Description

Definition at line 624 of file testKSSRegistry.py.


Member Function Documentation

Definition at line 626 of file testKSSRegistry.py.

00626 
00627     def afterSetUp(self):
00628         self.tool = getattr(self.portal, KSSTOOLNAME)
00629         self.tool.clearResources()
00630         self.tool.registerKineticStylesheet('plone_styles.kss')
00631         self.toolpath = '/' + self.tool.absolute_url(1)
00632         self.portalpath = '/' + getToolByName(self.portal, "portal_url")(1)
00633         self.setRoles(['Manager'])
00634         self.portal.invokeFactory('Document', 'index_html')
00635         self.setRoles(['Member'])

Definition at line 636 of file testKSSRegistry.py.

00636 
00637     def testPublishCSSThroughTool(self):
00638         response = self.publish(self.toolpath + '/plone_styles.kss')
00639         self.assertEqual(response.getStatus(), 200)
00640         self.assertEqual(response.getHeader('Content-Type'), 'text/css;charset=utf-8')

Definition at line 641 of file testKSSRegistry.py.

00641 
00642     def testPublishNonMagicCSSThroughTool(self):
00643         self.setRoles(['Manager'])
00644         body = """<dtml-var "'joined' + 'string'">"""
00645         self.portal.addDTMLMethod('testmethod', file=body)
00646         self.tool.registerKineticStylesheet('testmethod')
00647         response = self.publish(self.toolpath + '/testmethod')
00648         self.assertEqual(response.getStatus(), 200)
00649         self.assertEqual(response.getHeader('Content-Type'), 'text/css;charset=utf-8')
00650 

Here is the call graph for this function:


Member Data Documentation

Definition at line 631 of file testKSSRegistry.py.

Definition at line 627 of file testKSSRegistry.py.

Definition at line 630 of file testKSSRegistry.py.


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