[Erp5-report] r37290 luke - /erp5/trunk/products/ERP5/tests/testTradeCondition.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Jul 27 16:30:27 CEST 2010


Author: luke
Date: Tue Jul 27 16:30:26 2010
New Revision: 37290

URL: http://svn.erp5.org?rev=37290&view=rev
Log:
 - reuse SubcontentReindexingWrapper instead of relaying on other parts of system to check only one thing - that subcontent of Trade Condition is reindexed upon trade condition self reindexation

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

Modified: erp5/trunk/products/ERP5/tests/testTradeCondition.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testTradeCondition.py?rev=37290&r1=37289&r2=37290&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testTradeCondition.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testTradeCondition.py [utf8] Tue Jul 27 16:30:26 2010
@@ -32,8 +32,10 @@ import transaction
 from DateTime import DateTime
 
 from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
+from Products.ZSQLCatalog.SQLCatalog import Catalog
+from Products.ERP5Type.tests.utils import SubcontentReindexingWrapper
 
-class TradeConditionTestCase(ERP5TypeTestCase):
+class TradeConditionTestCase(ERP5TypeTestCase, SubcontentReindexingWrapper):
   """Tests for Trade Conditions and Tax
   """
   def getBusinessTemplateList(self):
@@ -97,6 +99,11 @@ class TradeConditionTestCase(ERP5TypeTes
     self.tic()
 
   def test_subcontent_supply_line_reindexing(self):
+    trade_condition = self.trade_condition_module.newContent(
+                            portal_type=self.trade_condition_type)
+    supply_line = trade_condition.newContent(portal_type=self.supply_line_type)
+    self._testSubContentReindexing(trade_condition, [supply_line])
+    return
     # If trade condition is modified, then supply lines must be reindexed
     another_resource = self.portal.product_module.newContent(portal_type='Product',
                                                              title='Another Resource')




More information about the Erp5-report mailing list