Commit 8611120f authored by iv's avatar iv

ERP5Workflow: use Workflow Test Document for permission test instead of Text

they don't require another bt to be installed and they are here for this purpose
parent 536564ac
...@@ -222,8 +222,7 @@ class TestConvertedWorkflow(TestERP5WorkflowMixin): ...@@ -222,8 +222,7 @@ class TestConvertedWorkflow(TestERP5WorkflowMixin):
portal_workflow = self.portal.portal_workflow portal_workflow = self.portal.portal_workflow
self.logMessage(" Save portal type original configuration") self.logMessage(" Save portal type original configuration")
text_portal_type = self.portal.portal_types._getOb('Text') text_portal_type = self.portal.portal_types._getOb('Workflow Test Document')
original_portal_type_workflow = text_portal_type.getTypeWorkflowList()
temporary_workflow_id = 'temporary_edit_workflow' temporary_workflow_id = 'temporary_edit_workflow'
self.copyWorkflow(portal_workflow, 'edit_workflow', self.copyWorkflow(portal_workflow, 'edit_workflow',
...@@ -234,9 +233,9 @@ class TestConvertedWorkflow(TestERP5WorkflowMixin): ...@@ -234,9 +233,9 @@ class TestConvertedWorkflow(TestERP5WorkflowMixin):
permission = 'View management screens' permission = 'View management screens'
permission_key = '_' + permission.replace(' ', '_') + '_Permission' permission_key = '_' + permission.replace(' ', '_') + '_Permission'
self.logMessage(" Create a text document: it will have the usual permissions" self.logMessage(" Create a Workflow Test document: it will have the usual"
+ " defined by edit_workflow") + " permissions defined by edit_workflow")
text_document = self.portal.document_module.newContent(portal_type='Text') text_document = self.getTestObject()
self.logMessage(" Verify that the permission '" + permission + "' is not " + self.logMessage(" Verify that the permission '" + permission + "' is not " +
"declared on the text document yet") "declared on the text document yet")
...@@ -286,9 +285,7 @@ class TestConvertedWorkflow(TestERP5WorkflowMixin): ...@@ -286,9 +285,7 @@ class TestConvertedWorkflow(TestERP5WorkflowMixin):
self.assertEqual(getattr(text_document, permission_key), ['Assignor']) self.assertEqual(getattr(text_document, permission_key), ['Assignor'])
self.logMessage(" Restore original configuration") self.logMessage(" Restore original configuration")
text_portal_type.setTypeWorkflowList(original_portal_type_workflow)
portal_workflow.manage_delObjects(temporary_workflow_id) portal_workflow.manage_delObjects(temporary_workflow_id)
self.portal.document_module.manage_delObjects(text_document.getId())
class TestDCWorkflow(TestERP5WorkflowMixin): class TestDCWorkflow(TestERP5WorkflowMixin):
""" """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment