[Erp5-report] r19163 - in /erp5/trunk/products/ERP5OOo/tests: ./ test_document/
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Feb 8 11:48:19 CET 2008
Author: romain
Date: Fri Feb 8 11:48:18 2008
New Revision: 19163
URL: http://svn.erp5.org?rev=19163&view=rev
Log:
Test validation state of embedded document after a convertion.
Added:
erp5/trunk/products/ERP5OOo/tests/test_document/EmbeddedImage-en-002.odt (with props)
Modified:
erp5/trunk/products/ERP5OOo/tests/testDms.py
Modified: erp5/trunk/products/ERP5OOo/tests/testDms.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5OOo/tests/testDms.py?rev=19163&r1=19162&r2=19163&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/tests/testDms.py (original)
+++ erp5/trunk/products/ERP5OOo/tests/testDms.py Fri Feb 8 11:48:18 2008
@@ -574,6 +574,26 @@
self.tic()
self.assertEquals('embedded', new_sub_document.getValidationState())
+ def test_08_EmbeddedDocumentState(self,quiet=QUIET,run=RUN_ALL_TEST):
+ """
+ Check the validation state of an embedded document
+ """
+ if not run: return
+ printAndLog('\nValidation State of an Embedded Document')
+ filename = 'EmbeddedImage-en-002.odt'
+ file = makeFileUpload(filename)
+ document = self.portal.portal_contributions.newContent(file=file)
+
+ get_transaction().commit()
+ self.tic()
+
+ self.assertEquals(0, len(document.contentValues(portal_type='Image')))
+ document.convert(format='html')
+ image_list = document.contentValues(portal_type='Image')
+ self.assertEquals(1, len(image_list))
+ image = image_list[0]
+ self.assertEquals('embedded', image.getValidationState())
+
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestDocument))
Added: erp5/trunk/products/ERP5OOo/tests/test_document/EmbeddedImage-en-002.odt
URL: http://svn.erp5.org/erp5/trunk/products/ERP5OOo/tests/test_document/EmbeddedImage-en-002.odt?rev=19163&view=auto
==============================================================================
Binary file - no diff available.
Propchange: erp5/trunk/products/ERP5OOo/tests/test_document/EmbeddedImage-en-002.odt
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
More information about the Erp5-report
mailing list