From c593cb32d9d47d726fa12efdce6d8bc5e13f5ab2 Mon Sep 17 00:00:00 2001
From: Yusuke Muraoka <yusuke@nexedi.com>
Date: Fri, 12 Mar 2010 02:11:14 +0000
Subject: [PATCH] change the afterSetUp method position to reset ID tool

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33679 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/tests/testERP5Simulation.py | 5 ++++-
 product/ERP5/tests/testInvoice.py        | 8 ++++----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/product/ERP5/tests/testERP5Simulation.py b/product/ERP5/tests/testERP5Simulation.py
index eb4ba70ae4..f214b623b8 100644
--- a/product/ERP5/tests/testERP5Simulation.py
+++ b/product/ERP5/tests/testERP5Simulation.py
@@ -506,7 +506,10 @@ class TestERP5SimulationPackingList(TestERP5SimulationMixin, TestPackingList):
   pass
 
 class TestERP5SimulationInvoice(TestERP5SimulationMixin, TestSaleInvoice):
-  pass
+
+  def afterSetUp(self):
+    super(TestERP5SimulationInvoice, self).afterSetUp()
+    self.portal.portal_ids.setLastGeneratedId(0, id_group='Accounting_Transaction_Module-Sale_Invoice_Transaction')
 
 def test_suite():
   suite = unittest.TestSuite()
diff --git a/product/ERP5/tests/testInvoice.py b/product/ERP5/tests/testInvoice.py
index 499e511399..4cd8922c52 100644
--- a/product/ERP5/tests/testInvoice.py
+++ b/product/ERP5/tests/testInvoice.py
@@ -2560,10 +2560,6 @@ class TestSaleInvoiceMixin(TestInvoiceMixin,
       stepCheckNewPackingListIsPacked
     """
 
-  def afterSetUp(self):
-    super(TestSaleInvoiceMixin, self).afterSetUp()
-    self.portal.portal_ids.setLastGeneratedId(0, id_group='Accounting_Transaction_Module-Sale_Invoice_Transaction')
-
 class TestSaleInvoice(TestSaleInvoiceMixin, TestInvoice, ERP5TypeTestCase):
   """Tests for sale invoice.
   """
@@ -2572,6 +2568,10 @@ class TestSaleInvoice(TestSaleInvoiceMixin, TestInvoice, ERP5TypeTestCase):
   # fix inheritance
   login = TestInvoiceMixin.login
 
+  def afterSetUp(self):
+    super(TestSaleInvoice, self).afterSetUp()
+    self.portal.portal_ids.setLastGeneratedId(0, id_group='Accounting_Transaction_Module-Sale_Invoice_Transaction')
+
   @UnrestrictedMethod
   def createCategories(self):
     TestPackingListMixin.createCategories(self)
-- 
2.30.9