Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def test_doAddGroup
def test_doChangeGroup
def test_doDelGroups
def testUserFolderAddGroup
def testUserFolderEditGroup
def testUserFolderDelGroups
def test_updateGroup_Roles
def beforeTearDown
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Public Attributes

 uf

Detailed Description

Definition at line 211 of file testGroupUserFolder.py.


Member Function Documentation

Definition at line 213 of file testGroupUserFolder.py.

00213 
00214     def afterSetUp(self):
00215         self.uf = self.portal.acl_users
00216         self._trap_warning_output()
00217 
00218         if 'auto_group' in self.uf.objectIds():
00219             self.uf.manage_delObjects(['auto_group'])
00220         self.uf.userFolderAddGroup(default_group, [])
00221         self.uf.userFolderAddGroup('group2', [])

Definition at line 263 of file testGroupUserFolder.py.

00263 
00264     def beforeTearDown(self):
00265         self._free_warning_output()
00266 

Here is the call 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 224 of file testGroupUserFolder.py.

00224 
00225     def test_doAddGroup(self):
00226         self.uf._doAddGroup('group3', ['Reviewer'])
00227         group = self.uf.getGroup('group3')
00228         self.assertEqual(tuple(group.getRoles()), ('Reviewer', 'Authenticated'))
00229         self.assertEqual(group.getGroups(), [])  # XXX: Should be tuple

Definition at line 230 of file testGroupUserFolder.py.

00230 
00231     def test_doChangeGroup(self):
00232         self.uf._doChangeGroup(default_group, ['Reviewer'])
00233         group = self.uf.getGroup(default_group)
00234         self.assertEqual(tuple(group.getRoles()), ('Reviewer', 'Authenticated'))

Definition at line 235 of file testGroupUserFolder.py.

00235 
00236     def test_doDelGroups(self):
00237         self.uf._doDelGroups([default_group])
00238         self.failUnless(self.uf.getGroup(default_group) is None)

Definition at line 258 of file testGroupUserFolder.py.

00258 
00259     def test_updateGroup_Roles(self):
00260         self.uf._updateGroup(default_group, roles=['Reviewer'])
00261         group = self.uf.getGroup(default_group)
00262         self.assertEqual(tuple(group.getRoles()), ('Reviewer', 'Authenticated'))

Definition at line 241 of file testGroupUserFolder.py.

00241 
00242     def testUserFolderAddGroup(self):
00243         self.uf.userFolderAddGroup('group3', ['Reviewer'])
00244         group = self.uf.getGroup('group3')
00245         self.assertEqual(tuple(group.getRoles()), ('Reviewer', 'Authenticated'))
00246         self.assertEqual(group.getGroups(), [])

Definition at line 252 of file testGroupUserFolder.py.

00252 
00253     def testUserFolderDelGroups(self):
00254         self.uf.userFolderDelGroups([default_group])
00255         self.failUnless(self.uf.getGroup(default_group) is None)

Definition at line 247 of file testGroupUserFolder.py.

00247 
00248     def testUserFolderEditGroup(self):
00249         self.uf.userFolderEditGroup(default_group, ['Reviewer'], [])
00250         group = self.uf.getGroup(default_group)
00251         self.assertEqual(tuple(group.getRoles()), ('Reviewer', 'Authenticated'))


Member Data Documentation

Definition at line 214 of file testGroupUserFolder.py.


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