From 280d86116ef3166bdb0db82537290b3e0aad64d4 Mon Sep 17 00:00:00 2001
From: Nicolas Dumazet <nicolas.dumazet@nexedi.com>
Date: Tue, 1 Feb 2011 02:19:26 +0000
Subject: [PATCH] weed out _aq_reset

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42856 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/CMFCategory/tests/testCMFCategory.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/product/CMFCategory/tests/testCMFCategory.py b/product/CMFCategory/tests/testCMFCategory.py
index 9096c6ddd3..06fced79cf 100644
--- a/product/CMFCategory/tests/testCMFCategory.py
+++ b/product/CMFCategory/tests/testCMFCategory.py
@@ -32,7 +32,6 @@ from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
 from Testing.ZopeTestCase.PortalTestCase import PortalTestCase
 from AccessControl.SecurityManagement import newSecurityManager
 from AccessControl.SecurityManagement import noSecurityManager
-from Products.ERP5Type.Base import _aq_reset
 
 try:
   from transaction import get as get_transaction
@@ -978,8 +977,12 @@ class TestCMFCategory(ERP5TypeTestCase):
     self.portal.portal_categories.manage_delObjects(['region'])
     get_transaction().commit()
     self.tic()
-    #call _aq_reset to regenerate Accessors
-    _aq_reset()
+    # XXX should be done in an Interaction Workflow,
+    # with the guarantee that it's only ever called once per transaction,
+    # that is, if several categories get changed in the same transaction,
+    # call it only ONCE (that is not the case with the current
+    # 'once per transaction', which is actually 'once per transaction per object'
+    self.portal.portal_types.resetDynamicDocuments()
     obj = self.portal.person_module.newContent(portal_type='Person')
     get_transaction().commit()
     self.tic()
-- 
2.30.9