[Erp5-report] r45081 jm - /erp5/trunk/products/ERP5Form/tests/testSelectionTool.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Apr 5 11:32:53 CEST 2011
Author: jm
Date: Tue Apr 5 11:32:53 2011
New Revision: 45081
URL: http://svn.erp5.org?rev=45081&view=rev
Log:
Do not use ugly Testing.ZODButil
Modified:
erp5/trunk/products/ERP5Form/tests/testSelectionTool.py
Modified: erp5/trunk/products/ERP5Form/tests/testSelectionTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/tests/testSelectionTool.py?rev=45081&r1=45080&r2=45081&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/tests/testSelectionTool.py [utf8] (original)
+++ erp5/trunk/products/ERP5Form/tests/testSelectionTool.py [utf8] Tue Apr 5 11:32:53 2011
@@ -31,7 +31,7 @@ from threading import Thread
from thread import get_ident
import transaction
-from Testing import ZODButil
+import ZODB
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from AccessControl.SecurityManagement import newSecurityManager
@@ -248,7 +248,7 @@ class TestSelectionPersistence(unittest.
SelectionTool._getUserId = lambda self: 'user'
SelectionTool._isAnonymous = lambda self: 0
- self.db = ZODButil.makeDB()
+ self.db = ZODB.DB(ZODB.DemoStorage.DemoStorage())
self.cnx = self.db.open()
self.portal_selections = \
self.cnx.root().portal_selections = SelectionTool()
@@ -259,7 +259,7 @@ class TestSelectionPersistence(unittest.
# revert the patch from setUp
SelectionTool._getUserId = SelectionTool._getUserId_saved
self.cnx.close()
- ZODButil.cleanDB()
+ self.db.close()
def _runWithAnotherConnection(self, thread_func):
"""runs `thread_func` with another ZODB connection
More information about the Erp5-report
mailing list