Back to index

plone3  3.1.7
Public Member Functions
CMFPlone.tests.testSecurityDeclarations.TestNavtreeSecurity Class Reference
Inheritance diagram for CMFPlone.tests.testSecurityDeclarations.TestNavtreeSecurity:
Inheritance graph
[legend]
Collaboration diagram for CMFPlone.tests.testSecurityDeclarations.TestNavtreeSecurity:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def testNavtreeStrategyBase
def testNavtreeStrategyBase
def testSitemapNavtreeStrategy
def testDefaultNavtreeStrategy
def testNavtreeQueryBuilder
def testSitemapQueryBuilder
def testGetNavigationRoot
def testBuildFolderTree
def setRequestMethod
def getAuthenticator
def setupAuthenticator
def addPS
def check
def checkUnauthorized

Detailed Description

Definition at line 443 of file testSecurityDeclarations.py.


Member Function Documentation

def CMFPlone.tests.testSecurityDeclarations.RestrictedPythonTest.addPS (   self,
  id,
  params = '',
  body = '' 
) [inherited]

Definition at line 20 of file testSecurityDeclarations.py.

00020 
00021     def addPS(self, id, params='', body=''):
00022         factory = self.folder.manage_addProduct['PythonScripts']
00023         factory.manage_addPythonScript(id)
00024         self.folder[id].ZPythonScript_edit(params, body)

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 25 of file testSecurityDeclarations.py.

00025 
00026     def check(self, psbody):
00027         self.addPS('ps', body=psbody)
00028         try:
00029             self.folder.ps()
00030         except (ImportError, Unauthorized), e:
00031             self.fail(e)

Here is the call graph for this function:

Definition at line 32 of file testSecurityDeclarations.py.

00032 
00033     def checkUnauthorized(self, psbody):
00034         self.addPS('ps', body=psbody)
00035         try:
00036             self.folder.ps()
00037         except (AttributeError, ImportError, Unauthorized):
00038             pass
00039 

Here is the call graph for this function:

Here is the caller graph for this function:

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:

Definition at line 488 of file testSecurityDeclarations.py.

00488 
00489     def testBuildFolderTree(self):
00490         self.check('from Products.CMFPlone.browser.navtree import buildFolderTree')

Here is the call graph for this function:

Definition at line 467 of file testSecurityDeclarations.py.

00467 
00468     def testDefaultNavtreeStrategy(self):
00469         # We don't test the decorator factory because that requres an
00470         # actual brain in item
00471         self.check('from Products.CMFPlone.browser.navtree import DefaultNavtreeStrategy;'
00472                     'n=DefaultNavtreeStrategy(context);'
00473                     'n.nodeFilter({"item":1});'
00474                     'n.subtreeFilter({"item":1});')

Here is the call graph for this function:

Definition at line 485 of file testSecurityDeclarations.py.

00485 
00486     def testGetNavigationRoot(self):
00487         self.check('from Products.CMFPlone.browser.navtree import getNavigationRoot')

Here is the call graph for this function:

Definition at line 475 of file testSecurityDeclarations.py.

00475 
00476     def testNavtreeQueryBuilder(self):
00477         self.check('from Products.CMFPlone.browser.navtree import NavtreeQueryBuilder;'
00478                     'n=NavtreeQueryBuilder(context);'
00479                     'n();')

Here is the call graph for this function:

Definition at line 445 of file testSecurityDeclarations.py.

00445 
00446     def testNavtreeStrategyBase(self):
00447         self.check('from Products.CMFPlone.browser.navtree import NavtreeStrategyBase;'
00448                     'n=NavtreeStrategyBase();'
00449                     'n.nodeFilter({});'
00450                     'n.subtreeFilter({});'
00451                     'n.decoratorFactory({});')

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 452 of file testSecurityDeclarations.py.

00452 
00453     def testNavtreeStrategyBase(self):
00454         self.check('from Products.CMFPlone.browser.navtree import NavtreeStrategyBase;'
00455                     'n=NavtreeStrategyBase();'
00456                     'n.nodeFilter({});'
00457                     'n.subtreeFilter({});'
00458                     'n.decoratorFactory({});')

Here is the call graph for this function:

Definition at line 459 of file testSecurityDeclarations.py.

00459 
00460     def testSitemapNavtreeStrategy(self):
00461         # We don't test the decorator factory because that requres an
00462         # actual brain in item
00463         self.check('from Products.CMFPlone.browser.navtree import SitemapNavtreeStrategy;'
00464                     'n=SitemapNavtreeStrategy(context);'
00465                     'n.nodeFilter({"item":1});'
00466                     'n.subtreeFilter({"item":1});')

Here is the call graph for this function:

Definition at line 480 of file testSecurityDeclarations.py.

00480 
00481     def testSitemapQueryBuilder(self):
00482         self.check('from Products.CMFPlone.browser.navtree import SitemapQueryBuilder;'
00483                     'n=SitemapQueryBuilder(context);'
00484                     'n();')

Here is the call graph for this function:


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