Package CMFSetup :: Package tests :: Module test_workflow
[show private | hide private]
[frames | no frames]

Module CMFSetup.tests.test_workflow

Unit tests for export / import of DCWorkflows and bindings.

$Id: test_workflow.py 37135 2005-07-08 13:24:33Z tseaver $
Classes
DummyWorkflow Folders are basic container objects that provide a standard interface for object management.
DummyWorkflowTool Folders are basic container objects that provide a standard interface for object management.
Test_exportWorkflow  
Test_importWorkflow  
WorkflowDefinitionConfiguratorTests  
WorkflowToolConfiguratorTests  
_GuardChecker  
_WorkflowSetup  

Function Summary
  test_suite()

Variable Summary
str _AFTER_CLOSE_SCRIPT = '## Script (Python) "after_close"\...
str _AFTER_KILL_SCRIPT = '## Script (Python) "after_kill"\n#...
str _BEFORE_OPEN_SCRIPT = '## Script (Python) "before_open"\...
str _BINDINGS_TOOL_EXPORT = '<?xml version="1.0"?>\n<workflo...
str _EMPTY_TOOL_EXPORT = '<?xml version="1.0"?>\n<workflow-t...
str _EMPTY_WORKFLOW_EXPORT = '<?xml version="1.0"?>\n<dc-wor...
str _FILENAME_TOOL_EXPORT = '<?xml version="1.0"?>\n<workflo...
str _NORMAL_TOOL_EXPORT = '<?xml version="1.0"?>\n<workflow-...
str _NORMAL_TOOL_EXPORT_WITH_FILENAME = '<?xml version="1.0"...
str _NORMAL_WORKFLOW_EXPORT = '<?xml version="1.0"?>\n<dc-wo...
str _OLD_WORKFLOW_EXPORT = '<?xml version="1.0"?>\n<dc-workf...
str _OVERRIDE_TOOL_EXPORT = '<?xml version="1.0"?>\n<workflo...
tuple _WF_GROUPS = ('Content_owners', 'Content_assassins')
tuple _WF_PERMISSIONS = ('Open content for modifications', 'Mo...
dict _WF_SCRIPTS = {'after_kill': ('Script (Python)', '## Scr...
dict _WF_STATES = {'expired': ('Expired', 'Expiration date ha...
dict _WF_TRANSITIONS = {'close': ('Close', 'Close the object ...
dict _WF_VARIABLES = {'killed_by': ('Killed by', 'n/a', '', T...
dict _WF_WORKLISTS = {'alive_list': ('Alive', 'Worklist for c...

Variable Details

_AFTER_CLOSE_SCRIPT

Type:
str
Value:
'''## Script (Python) "after_close"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=
...                                                                    

_AFTER_KILL_SCRIPT

Type:
str
Value:
'''## Script (Python) "after_kill"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=
...                                                                    

_BEFORE_OPEN_SCRIPT

Type:
str
Value:
'''## Script (Python) "before_open"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=
...                                                                    

_BINDINGS_TOOL_EXPORT

Type:
str
Value:
'''<?xml version="1.0"?>
<workflow-tool>
 <bindings>
  <default>
   <bound-workflow workflow_id="non_dcworkflow_0" />
   <bound-workflow workflow_id="non_dcworkflow_1" />
  </default>
  <type type_id="sometype">
...                                                                    

_EMPTY_TOOL_EXPORT

Type:
str
Value:
'''<?xml version="1.0"?>
<workflow-tool>
 <bindings>
  <default>
  </default>
 </bindings>
</workflow-tool>
'''                                                                    

_EMPTY_WORKFLOW_EXPORT

Type:
str
Value:
'''<?xml version="1.0"?>
<dc-workflow
    workflow_id="%s"
    title="%s"
    state_variable="state"
    initial_state="%s">
</dc-workflow>
'''                                                                    

_FILENAME_TOOL_EXPORT

Type:
str
Value:
'''<?xml version="1.0"?>
<workflow-tool>
 <workflow
    workflow_id="name with spaces"
    filename="workflows/name_with_spaces/definition.xml"
    meta_type="Workflow"
    />
 <bindings>
...                                                                    

_NORMAL_TOOL_EXPORT

Type:
str
Value:
'''<?xml version="1.0"?>
<workflow-tool>
 <workflow
    workflow_id="non_dcworkflow"
    meta_type="Dummy Workflow"
    />
 <workflow
    workflow_id="dcworkflow"
...                                                                    

_NORMAL_TOOL_EXPORT_WITH_FILENAME

Type:
str
Value:
'''<?xml version="1.0"?>
<workflow-tool>
 <workflow
    workflow_id="non_dcworkflow"
    meta_type="Dummy Workflow"
    />
 <workflow
    workflow_id="dcworkflow"
...                                                                    

_NORMAL_WORKFLOW_EXPORT

Type:
str
Value:
'''<?xml version="1.0"?>
<dc-workflow
    workflow_id="%(workflow_id)s"
    title="%(title)s"
    state_variable="state"
    initial_state="%(initial_state)s">
 <permission>Open content for modifications</permission>
 <permission>Modify content</permission>
...                                                                    

_OLD_WORKFLOW_EXPORT

Type:
str
Value:
'''<?xml version="1.0"?>
<dc-workflow
    workflow_id="%(workflow_id)s"
    title="%(title)s"
    state_variable="state"
    initial_state="%(initial_state)s">
 <permission>Open content for modifications</permission>
 <permission>Modify content</permission>
...                                                                    

_OVERRIDE_TOOL_EXPORT

Type:
str
Value:
'''<?xml version="1.0"?>
<workflow-tool>
 <bindings>
  <default>
   <bound-workflow workflow_id="foo" />
   <bound-workflow workflow_id="bar" />
  </default>
  <type type_id="qux">
...                                                                    

_WF_GROUPS

Type:
tuple
Value:
('Content_owners', 'Content_assassins')                                

_WF_PERMISSIONS

Type:
tuple
Value:
('Open content for modifications',
 'Modify content',
 'Query history',
 'Restore expired content')                                            

_WF_SCRIPTS

Type:
dict
Value:
{'after_close': ('Script (Python)',
                 '## Script (Python) "after_close"\n##bind container=c\
ontainer\n##bind context=context\n##bind namespace=\n##bind script=scr\
ipt\n##bind subpath=traverse_subpath\n##parameters=\n##title=\n##\nret\
urn \'after_close\'\n',
                 'workflows/%s/scripts/after_close.py'),
 'after_kill': ('Script (Python)',
                '## Script (Python) "after_kill"\n##bind container=con\
...                                                                    

_WF_STATES

Type:
dict
Value:
{'closed': ('Closed',
            'Closed for modifications',
            ('open', 'kill', 'expire'),
            {'Modify content': ()},
            (),
            {'is_opened': False, 'is_closed': True}),
 'expired': ('Expired',
             'Expiration date has passed',
...                                                                    

_WF_TRANSITIONS

Type:
dict
Value:
{'close': ('Close',
           'Close the object for modifications',
           'closed',
           1,
           '',
           'after_close',
           'Close',
           'string:${object_url}/close_for_modifications',
...                                                                    

_WF_VARIABLES

Type:
dict
Value:
{'killed_by': ('Killed by',
               'n/a',
               '',
               True,
               False,
               True,
               (),
               ('Hangman', 'Sherrif'),
...                                                                    

_WF_WORKLISTS

Type:
dict
Value:
{'alive_list': ('Alive',
                'Worklist for content not yet expired / killed',
                {'state': ('open', 'closed')},
                'Expired items',
                'string:${portal_url}/expired_items',
                'workflow',
                ('Restore expired content',),
                (),
...                                                                    

Generated by Epydoc 2.1 on Wed Nov 30 03:58:47 2005 http://epydoc.sf.net