Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def testPublishFiveResource

Public Attributes

 tool
 toolpath
 portalpath

Detailed Description

Definition at line 651 of file testKSSRegistry.py.


Member Function Documentation

Definition at line 654 of file testKSSRegistry.py.

00654 
00655     def afterSetUp(self):
00656         # Define some resource
00657         from Products.Five.zcml import load_config
00658         import Products.ResourceRegistries.tests
00659         load_config('test.zcml', Products.ResourceRegistries.tests)
00660         self.tool = getattr(self.portal, KSSTOOLNAME)
00661         self.tool.clearResources()
00662         self.tool.registerKineticStylesheet('++resource++test_rr_1.kss')
00663         self.toolpath = '/' + self.tool.absolute_url(1)
00664         self.portalpath = '/' + getToolByName(self.portal, "portal_url")(1)
00665         self.setRoles(['Manager'])
00666         self.portal.invokeFactory('Document', 'index_html')
00667         self.setRoles(['Member'])

Definition at line 668 of file testKSSRegistry.py.

00668 
00669     def testPublishFiveResource(self):
00670         response = self.publish(self.toolpath + '/++resource++test_rr_1.kss')
00671         self.assertEqual(response.getStatus(), 200)
00672         self.assertEqual(response.getHeader('Content-Type')[:10], 'text/plain')
00673         self.assertEqual('body { background-color : red }' in response.getBody(), True)
00674 


Member Data Documentation

Definition at line 663 of file testKSSRegistry.py.

Definition at line 659 of file testKSSRegistry.py.

Definition at line 662 of file testKSSRegistry.py.


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