[Erp5-report] r11057 - /erp5/trunk/products/ERP5/tests/testAccountingRules.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Nov 2 14:25:31 CET 2006


Author: jerome
Date: Thu Nov  2 14:25:30 2006
New Revision: 11057

URL: http://svn.erp5.org?rev=11057&view=rev
Log:
remove some unused methods; especially the one that was overloading
manage_beforeDelete on a document without calling manage_beforeDelete on the
parent. Note that such an error will make that the document is *not* removed
from catalog when it's deleted from the ZODB. I added an entry in the coding
crime wiki page for this.



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

Modified: erp5/trunk/products/ERP5/tests/testAccountingRules.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testAccountingRules.py?rev=11057&r1=11056&r2=11057&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testAccountingRules.py (original)
+++ erp5/trunk/products/ERP5/tests/testAccountingRules.py Thu Nov  2 14:25:30 2006
@@ -190,35 +190,9 @@
       "hd_size/120Go",
     )
 
-  def rollbackTest(self) :
-    """ delete everything created by the test (for 'live debugin')""" 
-    portal = self.getPortal()
-    from Products.ERP5.Document.AccountingTransaction \
-        import AccountingTransaction
-    self.tic()
-    old_manage_beforeDelete = AccountingTransaction.manage_beforeDelete 
-    AccountingTransaction.manage_beforeDelete = lambda x, y, z: 1
-    self.getAccountModule().deleteContent(
-          list(self.getAccountModule().objectIds()))
-    self.getAccountingModule().deleteContent(
-          list(self.getAccountingModule().objectIds()))
-    self.getOrganisationModule().deleteContent(
-          list(self.getOrganisationModule().objectIds()))
-    self.getCurrencyModule().deleteContent(
-          list(self.getCurrencyModule().objectIds()))
-    self.getProductModule().deleteContent(
-          list(self.getProductModule().objectIds()))
-    self.getSimulationTool().deleteContent(
-          list(self.getSimulationTool().objectIds()))
-    AccountingTransaction.manage_beforeDelete = old_manage_beforeDelete
-    self.tic()
-  
   def stepTic(self, **kw):
     self.tic()
 
-  def stepCommitTransaction(self, **kw):
-    get_transaction().commit()
-    
   def stepCreateSaleInvoiceTransactionRule(self, sequence, **kw) :
     """ 
       Create some predicates in the Invoice Transaction Rule




More information about the Erp5-report mailing list