Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
DCWorkflow.tests.test_roles.RoleMapTests Class Reference

List of all members.

Public Member Functions

def setUp
def testModifyRolesForGroup
def testModifyRolesForPermission

Public Attributes

 app
 ob

Detailed Description

Definition at line 27 of file test_roles.py.


Member Function Documentation

Definition at line 29 of file test_roles.py.

00029 
00030     def setUp(self):
00031         self.app = Application()
00032         self.app.ob = Folder()
00033         self.ob = self.app.ob
00034         self.ob.__ac_local_roles__ = {
00035             '(Group) Administrators': ['Manager', 'Member'],
00036             '(Group) Users': ['Member'],
00037             }
00038         self.ob._View_Permission = ('Member', 'Manager')
00039         self.ob._View_management_screens_Permission = ('Manager',)

Definition at line 40 of file test_roles.py.

00040 
00041     def testModifyRolesForGroup(self):
00042         modifyRolesForGroup(
00043             self.ob, '(Group) Administrators', ['Owner'], ['Member', 'Owner'])
00044         modifyRolesForGroup(
00045             self.ob, '(Group) Users', [], ['Member'])
00046         self.assertEqual(self.ob.__ac_local_roles__, {
00047             '(Group) Administrators': ['Manager', 'Owner'],
00048             })
00049         modifyRolesForGroup(
00050             self.ob, '(Group) Administrators', ['Member'], ['Member', 'Owner'])
00051         modifyRolesForGroup(
00052             self.ob, '(Group) Users', ['Member'], ['Member'])
00053         self.assertEqual(self.ob.__ac_local_roles__, {
00054             '(Group) Administrators': ['Manager', 'Member'],
00055             '(Group) Users': ['Member'],
00056             })

Here is the call graph for this function:

Definition at line 57 of file test_roles.py.

00057 
00058     def testModifyRolesForPermission(self):
00059         modifyRolesForPermission(self.ob, 'View', ['Manager'])
00060         modifyRolesForPermission(
00061             self.ob, 'View management screens', ['Member'])
00062         self.assertEqual(self.ob._View_Permission, ['Manager'])
00063         self.assertEqual(
00064             self.ob._View_management_screens_Permission, ['Member'])
00065 

Here is the call graph for this function:


Member Data Documentation

Definition at line 30 of file test_roles.py.

Definition at line 32 of file test_roles.py.


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