Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes
CMFCore.exportimport.tests.test_workflow.exportWorkflowToolTests Class Reference
Inheritance diagram for CMFCore.exportimport.tests.test_workflow.exportWorkflowToolTests:
Inheritance graph
[legend]
Collaboration diagram for CMFCore.exportimport.tests.test_workflow.exportWorkflowToolTests:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def test_empty
def test_normal

Static Public Attributes

 layer = ExportImportZCMLLayer

Detailed Description

Definition at line 169 of file test_workflow.py.


Member Function Documentation

Definition at line 173 of file test_workflow.py.

00173 
00174     def test_empty(self):
00175         from Products.CMFCore.exportimport.workflow import exportWorkflowTool
00176 
00177         site = self._initSite()
00178         context = DummyExportContext(site)
00179         exportWorkflowTool(context)
00180 
00181         self.assertEqual(len(context._wrote), 1)
00182         filename, text, content_type = context._wrote[0]
00183         self.assertEqual(filename, 'workflows.xml')
00184         self._compareDOM(text, _EMPTY_TOOL_EXPORT)
00185         self.assertEqual(content_type, 'text/xml')

Here is the call graph for this function:

Definition at line 186 of file test_workflow.py.

00186 
00187     def test_normal(self):
00188         from Products.CMFCore.exportimport.workflow import exportWorkflowTool
00189 
00190         WF_ID_NON = 'non_dcworkflow'
00191         WF_TITLE_NON = 'Non-DCWorkflow'
00192 
00193         site = self._initSite()
00194         wf_tool = site.portal_workflow
00195         nondcworkflow = DummyWorkflow(WF_TITLE_NON)
00196         nondcworkflow.title = WF_TITLE_NON
00197         wf_tool._setObject(WF_ID_NON, nondcworkflow)
00198 
00199         context = DummyExportContext(site)
00200         exportWorkflowTool(context)
00201 
00202         self.assertEqual(len(context._wrote), 2)
00203         filename, text, content_type = context._wrote[0]
00204         self.assertEqual(filename, 'workflows.xml')
00205         self._compareDOM(text, _NORMAL_TOOL_EXPORT)
00206         self.assertEqual(content_type, 'text/xml')
00207 

Here is the call graph for this function:


Member Data Documentation

Definition at line 171 of file test_workflow.py.


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