Commit d6fdd45c authored by Julien Muchembled's avatar Julien Muchembled

Do not use ugly Testing.ZODButil

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45081 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9e0cc53d
...@@ -31,7 +31,7 @@ from threading import Thread ...@@ -31,7 +31,7 @@ from threading import Thread
from thread import get_ident from thread import get_ident
import transaction import transaction
from Testing import ZODButil import ZODB
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from AccessControl.SecurityManagement import newSecurityManager from AccessControl.SecurityManagement import newSecurityManager
...@@ -248,7 +248,7 @@ class TestSelectionPersistence(unittest.TestCase): ...@@ -248,7 +248,7 @@ class TestSelectionPersistence(unittest.TestCase):
SelectionTool._getUserId = lambda self: 'user' SelectionTool._getUserId = lambda self: 'user'
SelectionTool._isAnonymous = lambda self: 0 SelectionTool._isAnonymous = lambda self: 0
self.db = ZODButil.makeDB() self.db = ZODB.DB(ZODB.DemoStorage.DemoStorage())
self.cnx = self.db.open() self.cnx = self.db.open()
self.portal_selections = \ self.portal_selections = \
self.cnx.root().portal_selections = SelectionTool() self.cnx.root().portal_selections = SelectionTool()
...@@ -259,7 +259,7 @@ class TestSelectionPersistence(unittest.TestCase): ...@@ -259,7 +259,7 @@ class TestSelectionPersistence(unittest.TestCase):
# revert the patch from setUp # revert the patch from setUp
SelectionTool._getUserId = SelectionTool._getUserId_saved SelectionTool._getUserId = SelectionTool._getUserId_saved
self.cnx.close() self.cnx.close()
ZODButil.cleanDB() self.db.close()
def _runWithAnotherConnection(self, thread_func): def _runWithAnotherConnection(self, thread_func):
"""runs `thread_func` with another ZODB connection """runs `thread_func` with another ZODB connection
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment