Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Private Member Functions
CMFDefault.tests.test_DefaultWorkflow.DefaultWorkflowDefinitionTests Class Reference

List of all members.

Public Member Functions

def setUp
def test_z2interfaces
def test_z3interfaces
def test_isActionSupported
def test_isActionSupported_with_keywargs

Public Attributes

 site

Private Member Functions

def _getDummyWorkflow

Detailed Description

Definition at line 28 of file test_DefaultWorkflow.py.


Member Function Documentation

Definition at line 60 of file test_DefaultWorkflow.py.

00060 
00061     def _getDummyWorkflow(self):
00062         wftool = self.site.portal_workflow
00063         return wftool.wf

Here is the caller graph for this function:

Definition at line 30 of file test_DefaultWorkflow.py.

00030 
00031     def setUp(self):
00032         from Products.CMFDefault.DefaultWorkflow \
00033                 import DefaultWorkflowDefinition
00034         self.site = DummySite('site')
00035         self.site._setObject('portal_types', DummyTool())
00036         self.site._setObject('portal_workflow', WorkflowTool())
00037         self.site._setObject('portal_membership', DummyTool())
00038         self.site._setObject('acl_users', DummyUserFolder())
00039 
00040         wftool = self.site.portal_workflow
00041         wftool._setObject('wf', DefaultWorkflowDefinition('wf'))
00042         wftool.setDefaultChain('wf')

Definition at line 64 of file test_DefaultWorkflow.py.

00064 
00065     def test_isActionSupported(self):
00066 
00067         wf = self._getDummyWorkflow()
00068         dummy = self.site._setObject('dummy', DummyContent())
00069 
00070         for action in ('submit', 'retract', 'publish', 'reject',):
00071             self.assert_(wf.isActionSupported(dummy, action))

Here is the call graph for this function:

Definition at line 72 of file test_DefaultWorkflow.py.

00072 
00073     def test_isActionSupported_with_keywargs(self):
00074 
00075         wf = self._getDummyWorkflow()
00076         dummy = self.site._setObject('dummy', DummyContent())
00077 
00078         for action in ('submit', 'retract', 'publish', 'reject',):
00079             self.assert_(wf.isActionSupported(dummy, action,
00080                                               arg1=1, arg2=2))

Here is the call graph for this function:

Definition at line 43 of file test_DefaultWorkflow.py.

00043 
00044     def test_z2interfaces(self):
00045         from Interface.Verify import verifyClass
00046         from Products.CMFCore.interfaces.portal_workflow \
00047                 import WorkflowDefinition as IWorkflowDefinition
00048         from Products.CMFDefault.DefaultWorkflow \
00049                 import DefaultWorkflowDefinition
00050 
00051         verifyClass(IWorkflowDefinition, DefaultWorkflowDefinition)

Definition at line 52 of file test_DefaultWorkflow.py.

00052 
00053     def test_z3interfaces(self):
00054         from zope.interface.verify import verifyClass
00055         from Products.CMFCore.interfaces import IWorkflowDefinition
00056         from Products.CMFDefault.DefaultWorkflow \
00057                 import DefaultWorkflowDefinition
00058 
00059         verifyClass(IWorkflowDefinition, DefaultWorkflowDefinition)


Member Data Documentation

Definition at line 33 of file test_DefaultWorkflow.py.


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