[Zope-CVS] CVS: Products/Ape/lib/apelib/tests - testzope2fs.py:1.3.2.2 testzope2sql.py:1.5.2.1
Shane Hathaway
shane@zope.com
Mon, 7 Jul 2003 23:58:48 -0400
Update of /cvs-repository/Products/Ape/lib/apelib/tests
In directory cvs.zope.org:/tmp/cvs-serv13815/tests
Modified Files:
Tag: ape-newconf-branch
testzope2fs.py testzope2sql.py
Log Message:
Added a SQL variant to apeconf.xml and fixed uncovered bugs
=== Products/Ape/lib/apelib/tests/testzope2fs.py 1.3.2.1 => 1.3.2.2 ===
--- Products/Ape/lib/apelib/tests/testzope2fs.py:1.3.2.1 Mon Jul 7 18:59:28 2003
+++ Products/Ape/lib/apelib/tests/testzope2fs.py Mon Jul 7 23:58:12 2003
@@ -31,8 +31,9 @@
from apelib.zodb3.db import ApeDB
from apelib.zodb3.storage import ApeStorage
from apelib.zodb3.resource import StaticResource
-from apelib.zope2.fsmapper import createMapper
+from apelib.zope2.fsmapper import createAbstractMapper
from apelib.fs.exceptions import FSWriteError
+from apelib.fs.connection import FSConnection
from zope2testbase import Zope2TestBase, Folder
@@ -43,17 +44,21 @@
tmpdir = mktemp()
+root_mapper = createAbstractMapper()
+
class Zope2FSTests (unittest.TestCase, Zope2TestBase):
- def _createMapper(self, path):
- return createMapper(path)
+ def _createConnections(self, path):
+ conn = FSConnection(path)
+ return {'fs': conn}
def setUp(self):
if not os.path.exists(tmpdir):
os.mkdir(tmpdir)
self.path = tmpdir
- self.root_mapper, conns = self._createMapper(tmpdir)
+ self.root_mapper = root_mapper
+ conns = self._createConnections(tmpdir)
assert len(conns) == 1
self.conn = conns['fs']
resource = StaticResource(self.root_mapper)
@@ -597,8 +602,9 @@
class Zope2FSUnderscoreTests (Zope2FSTests):
- def _createMapper(self, path):
- return createMapper(path, metadata_prefix='_')
+ def _createConnections(self, path):
+ conn = FSConnection(path, metadata_prefix='_')
+ return {'fs': conn}
if __name__ == '__main__':
=== Products/Ape/lib/apelib/tests/testzope2sql.py 1.5 => 1.5.2.1 ===
--- Products/Ape/lib/apelib/tests/testzope2sql.py:1.5 Mon May 19 15:32:35 2003
+++ Products/Ape/lib/apelib/tests/testzope2sql.py Mon Jul 7 23:58:12 2003
@@ -27,6 +27,8 @@
from zope2testbase import Zope2TestBase
+root_mapper = createAbstractMapper()
+
class Zope2SQLTests (Zope2TestBase):
dbapi_module = None # Name of the Database API module (required)
@@ -39,7 +41,7 @@
def setUp(self):
conn = self.getConnector()
- self.root_mapper = createAbstractMapper()
+ self.root_mapper = root_mapper
resource = StaticResource(self.root_mapper)
self.conns = {'db': conn}
storage = ApeStorage(resource, self.conns, clear_all=1)