Back to index

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

List of all members.

Public Member Functions

def test_basicPermissions
def test_basicPermissionsOnImage
def test_basicPermissionsOnFile
def test_proxy

Private Member Functions

def _checkProxyRoles

Detailed Description

Definition at line 24 of file test_FSMetadata.py.


Member Function Documentation

def CMFCore.tests.test_FSMetadata.FSMetadata._checkProxyRoles (   self,
  obj,
  roles 
) [private]

Definition at line 26 of file test_FSMetadata.py.

00026 
00027     def _checkProxyRoles(self, obj, roles):
00028         # Test proxy roles on the object
00029         for role in roles:
00030             if not obj.manage_haveProxy(role):
00031                 raise 'Object does not have the "%s" role' % role

Here is the caller graph for this function:

Definition at line 32 of file test_FSMetadata.py.

00032 
00033     def test_basicPermissions(self):
00034         # Test basic FS permissions
00035         # check it has a title
00036         assert(self.ob.fake_skin.test6.title == 'Test object')
00037         self._checkSettings(
00038             self.ob.fake_skin.test6,
00039             'Access contents information',
00040             1,
00041             ['Manager','Anonymous'])
00042         self._checkSettings(
00043             self.ob.fake_skin.test6,
00044             'View management screens',
00045             0,
00046             ['Manager'])
00047         self._checkProxyRoles(
00048             self.ob.fake_skin.test6,
00049             ['Manager', 'Anonymous'])

Here is the call graph for this function:

Definition at line 65 of file test_FSMetadata.py.

00065 
00066     def test_basicPermissionsOnFile(self):
00067         # Test basic FS permissions on File
00068         test_file = getattr(self.ob.fake_skin, 'test_file.swf')
00069         assert(test_file.title == 'Test file')
00070         self._checkSettings(
00071             test_file,
00072             'Access contents information',
00073             1,
00074             ['Manager','Anonymous'])
00075         self._checkSettings(
00076             test_file,
00077             'View management screens',
00078             0,
00079             ['Manager'])

Here is the call graph for this function:

Definition at line 50 of file test_FSMetadata.py.

00050 
00051     def test_basicPermissionsOnImage(self):
00052         # Test basic FS permissions on Image
00053         test_image = getattr(self.ob.fake_skin, 'test_image.gif')
00054         assert(test_image.title == 'Test image')
00055         self._checkSettings(
00056             test_image,
00057             'Access contents information',
00058             1,
00059             ['Manager','Anonymous'])
00060         self._checkSettings(
00061             test_image,
00062             'View management screens',
00063             0,
00064             ['Manager'])

Here is the call graph for this function:

Definition at line 80 of file test_FSMetadata.py.

00080 
00081     def test_proxy(self):
00082         # Test roles
00083         ob = self.ob.fake_skin.test_dtml
00084         self._checkProxyRoles(ob, ['Manager', 'Anonymous'])
00085 

Here is the call graph for this function:


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