From 41fa2d989b531df89daca9c828c285ebfb417890 Mon Sep 17 00:00:00 2001
From: Romain Courteaud <romain@nexedi.com>
Date: Fri, 2 Mar 2007 14:22:35 +0000
Subject: [PATCH] Call _aq_reset even if site already exists.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13186 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/tests/ERP5TypeTestCase.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/product/ERP5Type/tests/ERP5TypeTestCase.py b/product/ERP5Type/tests/ERP5TypeTestCase.py
index 0a4749de77..98695c31e4 100644
--- a/product/ERP5Type/tests/ERP5TypeTestCase.py
+++ b/product/ERP5Type/tests/ERP5TypeTestCase.py
@@ -494,6 +494,7 @@ def setupERP5Site( business_template_list=(),
       (e.g. '("erp5_base", )').
     '''
     global IS_PORTAL_EXISTING
+    from Products.ERP5Type.Base import _aq_reset
     if portal_name in failed_portal_installation:
       raise RuntimeError, 'Installation of %s already failed, giving up'\
                             % portal_name
@@ -597,7 +598,6 @@ def setupERP5Site( business_template_list=(),
                      for m in portal_activities.getMessageList()],)
 
           # Reset aq dynamic, so all unit tests will start again
-          from Products.ERP5Type.Base import _aq_reset
           _aq_reset()
 
           if os.environ.get('erp5_save_data_fs'):
@@ -644,6 +644,7 @@ def setupERP5Site( business_template_list=(),
           importLocalDocument(id_)
         for id_ in getLocalConstraintList():
           importLocalConstraint(id_)
+        _aq_reset()
 
       if IS_PORTAL_EXISTING == 1:
         # Display which test is run when loading for the 1st time
-- 
2.30.9