Back to index

plone3  3.1.7
Public Member Functions | Private Member Functions
CMFCore.tests.test_FSSecurity.FSSecurityBase Class Reference
Inheritance diagram for CMFCore.tests.test_FSSecurity.FSSecurityBase:
Inheritance graph
[legend]
Collaboration diagram for CMFCore.tests.test_FSSecurity.FSSecurityBase:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def setUp
def tearDown

Private Member Functions

def _checkSettings

Detailed Description

Definition at line 31 of file test_FSSecurity.py.


Member Function Documentation

def CMFCore.tests.test_FSSecurity.FSSecurityBase._checkSettings (   self,
  object,
  permissionname,
  acquire = 0,
  roles = [] 
) [private]

Definition at line 33 of file test_FSSecurity.py.

00033 
00034     def _checkSettings(self, object, permissionname, acquire=0, roles=[]):
00035         # check the roles and acquire settings for a permission on an
00036         # object are as expected
00037         happy = 0
00038         for pstuff in object.ac_inherited_permissions(1):
00039             name, value = pstuff[:2]
00040             if name == permissionname:
00041                 p = Permission(name, value, object)
00042                 groles = p.getRoles(default=[])
00043                 acquired = isinstance(groles, list)
00044                 expected = {}
00045                 for role in roles:
00046                     expected[role] = 1
00047                 got = {}
00048                 for role in groles:
00049                     got[role] = 1
00050                 self.assertEqual((acquire, expected), (acquired, got))
00051                 happy = 1
00052         if not happy:
00053             raise ValueError("'%s' not found in inherited permissions."
00054                              % permissionname)

Here is the caller graph for this function:

Definition at line 55 of file test_FSSecurity.py.

00055 
00056     def setUp( self ):
00057         # initialise skins
00058         WritableFSDVTest.setUp(self)
00059         self._registerDirectory(self)
00060         # set up ZODB
00061         RequestTest.setUp(self)
00062         # put object in ZODB
00063         root=self.root
00064         try: root._delObject('fake_skin')
00065         except AttributeError: pass
00066         root._setObject( 'fake_skin', self.ob.fake_skin )

Here is the call graph for this function:

Definition at line 67 of file test_FSSecurity.py.

00067 
00068     def tearDown( self ):
00069         RequestTest.tearDown(self)
00070         WritableFSDVTest.tearDown(self)
00071         self._ignore_log_errors()
00072         self._ignore_log_errors(subsystem='CMFCore.DirectoryView')
00073 

Here is the call graph for this function:


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