[Erp5-report] r36460 rafael - /erp5/trunk/products/ERP5/tests/testBusinessTemplate.py

nobody at svn.erp5.org nobody at svn.erp5.org
Sat Jun 19 05:05:01 CEST 2010


Author: rafael
Date: Sat Jun 19 05:05:00 2010
New Revision: 36460

URL: http://svn.erp5.org?rev=36460&view=rev
Log:
Improve comments and test name to provide a bit more clear information.

Modified:
    erp5/trunk/products/ERP5/tests/testBusinessTemplate.py

Modified: erp5/trunk/products/ERP5/tests/testBusinessTemplate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testBusinessTemplate.py?rev=36460&r1=36459&r2=36460&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testBusinessTemplate.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testBusinessTemplate.py [utf8] Sat Jun 19 05:05:00 2010
@@ -6752,13 +6752,18 @@ class TestBusinessTemplate(ERP5TypeTestC
     self.assertEquals(self.portal.exported_path,
         self.portal.portal_catalog.getResultValue(uid=uid))
 
-  def test_export_bt5_with_portal_type_actions(self):
+  def test_build_and_export_bt5_into_same_transaction(self):
     """
-      The bt5 must be exported correctly.
-      Without fail exporting the Portal Type Actions.
+      Copy, build and export a business template into the same transaction.
+
+      Make sure all objects can be exported, when build() and export() are
+      into the same transaction. 
     """
     portal = self.getPortalObject()
     template_tool = portal.portal_templates
+    # Use erp5_barcode because it contains ActionTemplateItem, which seems to
+    # cause problems to be export. Maybe create a test bt5 with all items could
+    # be more appropriated.
     bt5obj = portal.portal_catalog.getResultValue(portal_type='Business Template',
                                                   title='erp5_barcode')
     # it is required to copy and paste to be able to export it
@@ -6771,7 +6776,6 @@ class TestBusinessTemplate(ERP5TypeTestC
     new_bt5_obj.build()
     template_tool.export(new_bt5_obj)
 
-
 def test_suite():
   suite = unittest.TestSuite()
   suite.addTest(unittest.makeSuite(TestBusinessTemplate))




More information about the Erp5-report mailing list