Commit 77ec9df2 authored by Vincent Pelletier's avatar Vincent Pelletier

Only testZODB requires a _db property.

Creating this property on other tests "pollutes" the database, as it
creates the root object.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1933 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent b9269b66
......@@ -16,7 +16,6 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import unittest
import ZODB
from neo.tests.functional import NEOCluster, NEOFunctionalTest
......@@ -31,10 +30,8 @@ class ZODBTestCase(NEOFunctionalTest):
self.neo.setupDB()
self.neo.start()
self._storage = self.neo.getZODBStorage()
self._db = ZODB.DB(self._storage)
def tearDown(self):
self._db.close()
self._storage.cleanup()
self.neo.stop()
......
......@@ -17,11 +17,19 @@
import unittest
from ZODB.tests import testZODB
import ZODB
from neo.tests.zodb import ZODBTestCase
class NEOZODBTests(ZODBTestCase, testZODB.ZODBTests):
pass
def setUp(self):
super(NEOZODBTests, self).setUp()
self._db = ZODB.DB(self._storage)
def tearDown(self):
self._db.close()
super(NEOZODBTests, self).tearDown()
if __name__ == "__main__":
suite = unittest.makeSuite(NEOZODBTests, 'check')
......
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