Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def testWrapGroup
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Public Attributes

 acl_users
 groups
 groupdata

Detailed Description

Definition at line 19 of file testGroupDataTool.py.


Member Function Documentation

Definition at line 21 of file testGroupDataTool.py.

00021 
00022     def afterSetUp(self):
00023         self.acl_users = self.portal.acl_users
00024         self.groups = self.portal.portal_groups
00025         self.groupdata = self.portal.portal_groupdata
00026         self.groups.groupWorkspacesCreationFlag = 0
00027         self.groups.addGroup('foo')
00028         # MUST reset _v_ attributes!
00029         self.groupdata._v_temps = None
00030         if 'auto_group' in self.acl_users.objectIds():
00031             self.acl_users.manage_delObjects(['auto_group'])

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 32 of file testGroupDataTool.py.

00032 
00033     def testWrapGroup(self):
00034         g = self.acl_users.getGroup('foo')
00035         self.assertEqual(g.__class__.__name__, 'PloneGroup')
00036         g = self.groupdata.wrapGroup(g)
00037         self.assertEqual(g.__class__.__name__, 'GroupData')
00038         self.assertEqual(g.aq_parent.__class__.__name__, 'PloneGroup')
00039         self.assertEqual(g.aq_parent.aq_parent.__class__.__name__, 'GroupManager')
00040 


Member Data Documentation

Definition at line 22 of file testGroupDataTool.py.

Definition at line 24 of file testGroupDataTool.py.

Definition at line 23 of file testGroupDataTool.py.


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