Commit 0d6bf995 authored by Ivan Tyagov's avatar Ivan Tyagov

Test changes after introduction of 'Embedded File' portal type.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41989 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 63a92659
...@@ -699,11 +699,9 @@ class TestDocument(TestDocumentMixin): ...@@ -699,11 +699,9 @@ class TestDocument(TestDocumentMixin):
Check the validation state of embedded document when its container is Check the validation state of embedded document when its container is
cloned cloned
""" """
filename = 'TEST-en-002.doc' document = self.portal.person_module.newContent(portal_type='Person')
file = makeFileUpload(filename)
document = self.portal.portal_contributions.newContent(file=file)
sub_document = document.newContent(portal_type='Image') sub_document = document.newContent(portal_type='Embedded File')
self.assertEquals('embedded', sub_document.getValidationState()) self.assertEquals('embedded', sub_document.getValidationState())
transaction.commit() transaction.commit()
self.tic() self.tic()
...@@ -716,7 +714,7 @@ class TestDocument(TestDocumentMixin): ...@@ -716,7 +714,7 @@ class TestDocument(TestDocumentMixin):
paste_result = container.manage_pasteObjects(cb_copy_data=clipboard) paste_result = container.manage_pasteObjects(cb_copy_data=clipboard)
new_document = container[paste_result[0]['new_id']] new_document = container[paste_result[0]['new_id']]
new_sub_document_list = new_document.contentValues(portal_type='Image') new_sub_document_list = new_document.contentValues(portal_type='Embedded File')
self.assertEquals(1, len(new_sub_document_list)) self.assertEquals(1, len(new_sub_document_list))
new_sub_document = new_sub_document_list[0] new_sub_document = new_sub_document_list[0]
self.assertEquals('embedded', new_sub_document.getValidationState()) self.assertEquals('embedded', new_sub_document.getValidationState())
......
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