Back to index

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


Member Function Documentation

Definition at line 786 of file testCSSRegistry.py.

00786 
00787     def afterSetUp(self):
00788         # Define some resource
00789         from Products.Five.zcml import load_config
00790         import Products.ResourceRegistries.tests
00791         load_config('test.zcml', Products.ResourceRegistries.tests)
00792         self.tool = getattr(self.portal, CSSTOOLNAME)
00793         self.tool.clearResources()
00794         self.tool.registerStylesheet('++resource++test_rr_1.css')
00795         self.toolpath = '/' + self.tool.absolute_url(1)
00796         self.portalpath = '/' + getToolByName(self.portal, 'portal_url')(1)
00797         self.setRoles(['Manager'])
00798         self.portal.invokeFactory('Document', 'index_html')
00799         self.setRoles(['Member'])

Definition at line 800 of file testCSSRegistry.py.

00800 
00801     def testPublishFiveResource(self):
00802         response = self.publish(self.toolpath + '/++resource++test_rr_1.css')
00803         self.assertEqual(response.getStatus(), 200)
00804         self.assertEqual(response.getHeader('Content-Type')[:8], 'text/css')
00805         self.assertEqual('body { background-color : red }' in response.getBody(), True)
00806 


Member Data Documentation

Definition at line 795 of file testCSSRegistry.py.

Definition at line 791 of file testCSSRegistry.py.

Definition at line 794 of file testCSSRegistry.py.


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