Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
NuPlone.tests.testStyleInstallation.testResourceRegistrations Class Reference

List of all members.

Public Member Functions

def afterSetUp
def testStylesheetsInstalled
def testStylesheetProperties
def testStylesheetsUpdated
def testJavascriptsInstalled
def testMemberStylesheetProperties
def testJavascriptsUpdated

Public Attributes

 qitool
 csstool
 jstool
 stylesheets
 javascripts

Detailed Description

Definition at line 53 of file testStyleInstallation.py.


Member Function Documentation

Definition at line 55 of file testStyleInstallation.py.

00055 
00056     def afterSetUp(self):
00057         self.qitool      = getattr(self.portal, 'portal_quickinstaller')
00058         self.csstool     = getattr(self.portal, 'portal_css')
00059         self.jstool      = getattr(self.portal, 'portal_javascripts')
00060         product_settings = getattr(self.qitool, PROJECTNAME)
00061         self.stylesheets = product_settings.resources_css
00062         self.javascripts = product_settings.resources_js

Test if new javascripts were added to portal_javascripts.

Definition at line 84 of file testStyleInstallation.py.

00084 
00085     def testJavascriptsInstalled(self):
00086         """Test if new javascripts were added to portal_javascripts."""
00087         javascriptids = self.jstool.getResourceIds()
00088         for js in JAVASCRIPTS:
00089             self.failUnless(js['id'] in javascriptids)

Test if existing javascripts were correctly updated.

Definition at line 97 of file testStyleInstallation.py.

00097 
00098     def testJavascriptsUpdated(self):
00099         """Test if existing javascripts were correctly updated."""
00100         for config in [c for c in JAVASCRIPTS
00101                        if c['id'] not in self.javascripts]:
00102             resource = self.jstool.getResource(config['id'])
00103             for key in [k for k in config.keys() if k != 'id']:
00104                 self.failUnless(resource._data.has_key('original_'+key))

Test if new javascripts have correct parameters.

Definition at line 90 of file testStyleInstallation.py.

00090 
00091     def testMemberStylesheetProperties(self):
00092         """Test if new javascripts have correct parameters."""
00093         for config in JAVASCRIPTS:
00094             res = self.jstool.getResource(config['id'])
00095             for key in [key for key in config.keys() if key != 'id']:
00096                 self.assertEqual(res._data[key], config[key])

Test if new stylesheets have correct parameters.

Definition at line 69 of file testStyleInstallation.py.

00069 
00070     def testStylesheetProperties(self):
00071         """Test if new stylesheets have correct parameters."""
00072         for config in STYLESHEETS:
00073             res = self.csstool.getResource(config['id'])
00074             for key in [key for key in config.keys() if key != 'id']:
00075                 self.assertEqual(res._data[key], config[key])

Test if new stylesheets were added to portal_css.

Definition at line 63 of file testStyleInstallation.py.

00063 
00064     def testStylesheetsInstalled(self):
00065         """Test if new stylesheets were added to portal_css."""
00066         stylesheetids = self.csstool.getResourceIds()
00067         for css in STYLESHEETS:
00068             self.failUnless(css['id'] in stylesheetids)

Test if existing stylesheets were correctly updated.

Definition at line 76 of file testStyleInstallation.py.

00076 
00077     def testStylesheetsUpdated(self):
00078         """Test if existing stylesheets were correctly updated."""
00079         for config in [c for c in STYLESHEETS
00080                        if c['id'] not in self.stylesheets]:
00081             resource = self.csstool.getResource(config['id'])
00082             for key in [k for k in config.keys() if k != 'id']:
00083                 self.failUnless(resource._data.has_key('original_'+key))


Member Data Documentation

Definition at line 57 of file testStyleInstallation.py.

Definition at line 61 of file testStyleInstallation.py.

Definition at line 58 of file testStyleInstallation.py.

Definition at line 56 of file testStyleInstallation.py.

Definition at line 60 of file testStyleInstallation.py.


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