Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
plone.app.workflow.tests.base.WorkflowFunctionalTestCase Class Reference
Inheritance diagram for plone.app.workflow.tests.base.WorkflowFunctionalTestCase:
Inheritance graph
[legend]
Collaboration diagram for plone.app.workflow.tests.base.WorkflowFunctionalTestCase:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def afterSetUp
def setUpDefaultWorkflow

Public Attributes

 newsitem
 event
 document
 workflow

Detailed Description

Base class for functional integration tests for plone.app.workflow. 
This may provide specific set-up and tear-down operations, or provide 
convenience methods.

Definition at line 26 of file base.py.


Member Function Documentation

Definition at line 32 of file base.py.

00032 
00033     def afterSetUp(self):
00034 
00035         self.portal.acl_users._doAddUser('manager', 'secret', ['Manager',],[])
00036         self.portal.acl_users._doAddUser('member', 'secret', ['Member',],[])
00037         self.portal.acl_users._doAddUser('owner', 'secret', ['Owner',],[])
00038         self.portal.acl_users._doAddUser('reviewer', 'secret', ['Reviewer',],[])
00039         self.portal.acl_users._doAddUser('editor', 'secret', ['Editor',],[])
00040         self.portal.acl_users._doAddUser('reader', 'secret', ['Reader',],[])
00041         
00042         self.portal.acl_users._doAddUser('delegate_reader', 'secret', ['Member',],[]) 
00043         self.portal.acl_users._doAddUser('delegate_editor', 'secret', ['Member',],[])
00044         self.portal.acl_users._doAddUser('delegate_contributor', 'secret', ['Member',],[])
00045         self.portal.acl_users._doAddUser('delegate_reviewer', 'secret', ['Member',],[])
00046         #self.portal.acl_users._doAddUser('delegate_manager', 'secret', ['Member',],[])
00047 
00048         self.setRoles(('Manager',))
00049         self.folder.invokeFactory('News Item', 'newsitem1')
00050         self.newsitem = self.folder.newsitem1
00051         self.folder.invokeFactory('Event', 'event1')
00052         self.event = self.folder.event1
00053         self.folder.invokeFactory('Document', 'document1')
00054         self.document = self.folder.document1
00055         self.setRoles(('Member',))

Here is the call graph for this function:

def plone.app.workflow.tests.base.WorkflowFunctionalTestCase.setUpDefaultWorkflow (   self,
  defaultWorkflow = None,
  hasFolderSpecificWorkflow = False 
)

Definition at line 56 of file base.py.

00056 
00057     def setUpDefaultWorkflow(self, defaultWorkflow=None, hasFolderSpecificWorkflow=False):
00058         # XXX - TODO: we'll be able to replace this all with the new remap template
00059         self.workflow = self.portal.portal_workflow
00060         ctypes        = self.portal.allowedContentTypes()
00061         # XXX figure out the real way to get the types
00062         ctypes        = ('Document','Folder','News Item','Event',)
00063 
00064         for ctype in ctypes:
00065             if ctype in ('Folder','Smart Folder') and hasFolderSpecificWorkflow:
00066                 # XXX factor in *_folder_* workflow declarations
00067                 self.workflow.setChainForPortalTypes(('%s' % ctype,), ('%s' % defaultWorkflow,))
00068             else:
00069                 self.workflow.setChainForPortalTypes(('%s' % ctype,), ('%s' % defaultWorkflow,))
00070 
00071     

Member Data Documentation

Definition at line 53 of file base.py.

Definition at line 51 of file base.py.

Definition at line 49 of file base.py.

Definition at line 58 of file base.py.


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