Commit f0186e1f authored by Romain Courteaud's avatar Romain Courteaud

Check processing state when cloning an uploaded document.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19066 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 24df5a69
......@@ -498,8 +498,21 @@ class TestDocument(ERP5TypeTestCase, ZopeTestCase.Functional):
self.assertEquals('converting', document.getExternalProcessingState())
get_transaction().commit()
self.assertEquals('converting', document.getExternalProcessingState())
# Clone a uploaded document
container = document.getParentValue()
clipboard = container.manage_copyObjects(ids=[document.getId()])
paste_result = container.manage_pasteObjects(cb_copy_data=clipboard)
new_document = container[paste_result[0]['new_id']]
self.assertEquals('converting', new_document.getExternalProcessingState())
get_transaction().commit()
self.assertEquals('converting', new_document.getExternalProcessingState())
# Change workflow state to converted
self.tic()
self.assertEquals('converted', document.getExternalProcessingState())
self.assertEquals('converted', new_document.getExternalProcessingState())
# Clone a converted document
container = document.getParentValue()
......
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