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

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Oct 4 19:36:20 CEST 2007


Author: bartek
Date: Thu Oct  4 19:36:20 2007
New Revision: 16836

URL: http://svn.erp5.org?rev=16836&view=rev
Log:
Fixed bug - the test tried to contribute different types of files with the same coordinates

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=16836&r1=16835&r2=16836&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/tests/testIngestion.py (original)
+++ erp5/trunk/products/ERP5OOo/tests/testIngestion.py Thu Oct  4 19:36:20 2007
@@ -373,10 +373,19 @@
                         ,('jpg', 'Image')
                         ,('py', 'File')
                         )
+    counter = 1
+    old_portal_type = ''
     for extension, portal_type in extension_to_type:
       filename = 'TEST-en-002.' + extension
       printAndLog(filename)
       file = makeFileUpload(filename)
+      # if we change portal type we must change version because 
+      # mergeRevision would fail
+      if portal_type != old_portal_type:
+        counter += 1
+        old_portal_type = portal_type
+      file.filename = 'TEST-en-00%d.%s' % (counter, extension)
+      printAndLog(file.filename)
       if with_portal_type:
         ob = self.portal.portal_contributions.newContent(portal_type=portal_type, file=file)
       else:
@@ -1178,7 +1187,7 @@
   framework()
 else:
   import unittest
-  def notest_suite():
+  def test_suite():
     suite = unittest.TestSuite()
     suite.addTest(unittest.makeSuite(TestIngestion))
     return suite




More information about the Erp5-report mailing list