[Erp5-report] r12619 - /erp5/trunk/products/ERP5/tests/testInventoryAPI.py

nobody at svn.erp5.org nobody at svn.erp5.org
Sun Feb 11 16:04:51 CET 2007


Author: jerome
Date: Sun Feb 11 16:04:48 2007
New Revision: 12619

URL: http://svn.erp5.org?rev=12619&view=rev
Log:
Overload getPortalName to use the same portal for all tests in this file


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

Modified: erp5/trunk/products/ERP5/tests/testInventoryAPI.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testInventoryAPI.py?rev=12619&r1=12618&r2=12619&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testInventoryAPI.py (original)
+++ erp5/trunk/products/ERP5/tests/testInventoryAPI.py Sun Feb 11 16:04:48 2007
@@ -66,7 +66,16 @@
   
   def getTitle(self):
     """Title of the test."""
-    return self.__class__.__doc__
+    return 'Inventory API'
+
+  def getPortalName(self):
+    """ID of the portal. """
+    forced_portal_id = os.environ.get('erp5_tests_portal_id')
+    if forced_portal_id:
+      return str(forced_portal_id)
+    # all test methods here cleanup correctly, so we can use the same portal
+    # for all those tests.
+    return 'inventory_api_test'
 
   def afterSetUp(self):
     """set up """




More information about the Erp5-report mailing list