[Erp5-report] r38802 nicolas - /erp5/trunk/products/ERP5OOo/tests/testIngestion.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Sep 30 14:56:00 CEST 2010


Author: nicolas
Date: Thu Sep 30 14:56:00 2010
New Revision: 38802

URL: http://svn.erp5.org?rev=38802&view=rev
Log:
Replace 'not implemented' log message by something more concrete.
The test itself is not very usefull, but I do not want remove it.

Modified:
    erp5/trunk/products/ERP5OOo/tests/testIngestion.py

Modified: erp5/trunk/products/ERP5OOo/tests/testIngestion.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5OOo/tests/testIngestion.py?rev=38802&r1=38801&r2=38802&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/tests/testIngestion.py [utf8] (original)
+++ erp5/trunk/products/ERP5OOo/tests/testIngestion.py [utf8] Thu Sep 30 14:56:00 2010
@@ -776,11 +776,18 @@ class TestIngestion(ERP5TypeTestCase):
 
   def stepExportImage(self, sequence=None, sequence_list=None, **kw):
     """
-      Don't see a way to test it here, Image.index_html makes heavy use 
-      of REQUEST and RESPONSE, and the rest of the implementation is way down
-      in Zope core
+      Check we are able to resize images
     """
-    printAndLog('stepExportImage not implemented')
+    image = self.portal.image_module.six
+    f = makeFileUpload('TEST-en-002.jpg')
+    image.edit(file=f)
+    self.stepTic()
+    mime, data = image.convert(None)
+    self.assertEquals(mime, 'image/jpeg')
+    mime, small_data = image.convert(None, display='small')
+    mime, large_data = image.convert(None, display='xlarge')
+    # Check we are able to resize the image.
+    self.assertTrue(len(small_data) < len(large_data))
 
   def stepCleanUp(self, sequence=None, sequence_list=None, **kw):
     """




More information about the Erp5-report mailing list