Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Private Member Functions
CMFPlone.tests.zcheck.TestSkins Class Reference
Inheritance diagram for CMFPlone.tests.zcheck.TestSkins:
Inheritance graph
[legend]
Collaboration diagram for CMFPlone.tests.zcheck.TestSkins:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def afterSetUp
def testSkins
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Public Attributes

 verbose

Private Member Functions

def _report
def _skinpath
def _filepath

Detailed Description

Definition at line 30 of file zcheck.py.


Member Function Documentation

def CMFPlone.tests.zcheck.TestSkins._filepath (   self,
  obj 
) [private]

Definition at line 68 of file zcheck.py.

00068 
00069     def _filepath(self, obj):
00070         filepath = getattr(obj, 'getObjectFSPath', None)
00071         if filepath is not None:
00072             return filepath()
00073 

Here is the caller graph for this function:

def CMFPlone.tests.zcheck.TestSkins._report (   self,
  result 
) [private]

Definition at line 52 of file zcheck.py.

00052 
00053     def _report(self, result):
00054         msg = result['msg']
00055         obj = result['obj']
00056         if msg:
00057             if self.verbose:
00058                 _print('\n')
00059             _print('------\n%s\n' % self._skinpath(obj))
00060             for line in msg:
00061                 _print('%s\n' % line)
00062         else:
00063             if self.verbose:
00064                 _print('.')

Here is the call graph for this function:

Here is the caller graph for this function:

def CMFPlone.tests.zcheck.TestSkins._skinpath (   self,
  obj 
) [private]

Definition at line 65 of file zcheck.py.

00065 
00066     def _skinpath(self, obj):
00067         return '/'.join(obj.getPhysicalPath()[2:])

Here is the caller graph for this function:

Definition at line 33 of file zcheck.py.

00033 
00034     def afterSetUp(self):
00035         factory = self.portal.manage_addProduct['ZChecker']
00036         factory.manage_addZChecker('zchecker')
00037         self.portal.zchecker.setIgnoreObjectIds(ignoredObjectIds)
00038         import sys
00039         self.verbose = not '-q' in sys.argv

Definition at line 30 of file PloneTestCase.py.

00030 
00031     def getAuthenticator(self):
00032         tag = AuthenticatorView('context', 'request').authenticator()
00033         pattern = '<input .*name="(\w+)".*value="(\w+)"'
00034         return match(pattern, tag).groups()

Here is the call graph for this function:

Here is the caller graph for this function:

def CMFPlone.tests.PloneTestCase.PloneTestCase.setRequestMethod (   self,
  method 
) [inherited]
This is a stub now, but in case you want to try
   something fancy on Your Branch (tm), put it here.

Definition at line 26 of file PloneTestCase.py.

00026 
00027     def setRequestMethod(self, method):
00028         self.app.REQUEST.set('REQUEST_METHOD', method)
00029         self.app.REQUEST.method = method

Here is the caller graph for this function:

Definition at line 35 of file PloneTestCase.py.

00035 
00036     def setupAuthenticator(self):
00037         name, token = self.getAuthenticator()
00038         self.app.REQUEST.form[name] = token
00039 

Here is the call graph for this function:

Here is the caller graph for this function:

Runs the ZChecker on skins

Definition at line 40 of file zcheck.py.

00040 
00041     def testSkins(self):
00042         '''Runs the ZChecker on skins'''
00043         dirs = self.portal.portal_skins.objectValues()
00044         for dir in dirs:
00045             # filter out certain skin layers
00046             if self._skinpath(dir) not in ignoredSkinLayers:
00047                 results = self.portal.zchecker.checkObjects(dir.objectValues())
00048                 for result in results:
00049                     self._report(result)
00050         if self.verbose:
00051             _print('\n')

Here is the call graph for this function:


Member Data Documentation

Definition at line 38 of file zcheck.py.


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