[Erp5-report] r32186 jerome - in /erp5/trunk/products/ERP5OOo/tests: ./ test_document/

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Feb 2 15:51:34 CET 2010


Author: jerome
Date: Tue Feb  2 15:51:34 2010
New Revision: 32186

URL: http://svn.erp5.org?rev=32186&view=rev
Log:
If there are more than one path defined in the category upload spreadsheets
(for instance more than one * in paths columns), this is an error that should
be reported.

Added:
    erp5/trunk/products/ERP5OOo/tests/test_document/import_region_category_multiple_paths.ods   (with props)
Modified:
    erp5/trunk/products/ERP5OOo/tests/testOOoImport.py

Modified: erp5/trunk/products/ERP5OOo/tests/testOOoImport.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5OOo/tests/testOOoImport.py?rev=32186&r1=32185&r2=32186&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/tests/testOOoImport.py [utf8] (original)
+++ erp5/trunk/products/ERP5OOo/tests/testOOoImport.py [utf8] Tue Feb  2 15:51:34 2010
@@ -960,6 +960,19 @@
     else:
       self.fail('ValueError not raised')
 
+  def test_Base_getCategoriesSpreadSheetMapping_MultiplePaths(self):
+    # If multiple paths is defined (for instance more than one * in paths
+    # columns), then it should be an error and the error must be reported
+    import_file = makeFileUpload(
+        'import_region_category_multiple_paths.ods')
+    try:
+      self.portal.portal_categories.Base_getCategoriesSpreadSheetMapping(
+             import_file=import_file)
+    except ValueError, error:
+      self.assertTrue('More that one path is defined' in str(error), str(error))
+    else:
+      self.fail('ValueError not raised')
+
   def test_Base_getCategoriesSpreadSheetMapping_Id_is_reserved_property_name(self):
     # tests Base_getCategoriesSpreadSheetMapping reserved property name are only test for path column, not all.
     import_file = makeFileUpload(

Added: erp5/trunk/products/ERP5OOo/tests/test_document/import_region_category_multiple_paths.ods
URL: http://svn.erp5.org/erp5/trunk/products/ERP5OOo/tests/test_document/import_region_category_multiple_paths.ods?rev=32186&view=auto
==============================================================================
Binary file - no diff available.

Propchange: erp5/trunk/products/ERP5OOo/tests/test_document/import_region_category_multiple_paths.ods
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream




More information about the Erp5-report mailing list