[Zope-CVS] CVS: Products/Ape/lib/apelib/tests -
serialtestbase.py:1.7 testzope2sql.py:1.13
Shane Hathaway
shane at zope.com
Wed Jul 21 02:38:36 EDT 2004
Update of /cvs-repository/Products/Ape/lib/apelib/tests
In directory cvs.zope.org:/tmp/cvs-serv1879/lib/apelib/tests
Modified Files:
serialtestbase.py testzope2sql.py
Log Message:
Merged sql-types-branch.
=== Products/Ape/lib/apelib/tests/serialtestbase.py 1.6 => 1.7 ===
--- Products/Ape/lib/apelib/tests/serialtestbase.py:1.6 Sat Mar 20 01:34:24 2004
+++ Products/Ape/lib/apelib/tests/serialtestbase.py Wed Jul 21 02:38:05 2004
@@ -47,7 +47,7 @@
class SerialTestBase:
def setUp(self):
- schema = schemas.FieldSchema("classification", "classification")
+ schema = schemas.ColumnSchema("classification", "classification")
cfr = classifiers.SimpleClassifier(gateways.RAMGateway(schema))
oid_gen = oidgen.SerialOIDGenerator()
self.conf = mapper.MapperConfiguration({}, cfr, oid_gen)
=== Products/Ape/lib/apelib/tests/testzope2sql.py 1.12 => 1.13 ===
--- Products/Ape/lib/apelib/tests/testzope2sql.py:1.12 Wed Mar 24 23:28:23 2004
+++ Products/Ape/lib/apelib/tests/testzope2sql.py Wed Jul 21 02:38:05 2004
@@ -19,7 +19,6 @@
import unittest
import sys
-import apelib.sql.dbapi
from apelib.zodb3.db import ApeDB
from apelib.zodb3.storage import ApeStorage
from apelib.zodb3.resource import StaticResource
@@ -36,7 +35,10 @@
connect_expression = ''
def get_connection(self):
- c = getattr(apelib.sql.dbapi, self.class_name)
+ pos = self.class_name.rfind('.')
+ m = self.class_name[:pos]
+ cn = self.class_name[pos + 1:]
+ c = getattr(__import__(m, {}, {}, ('__doc__',)), cn)
return c(self.dbapi_module, self.connect_expression, prefix="apetest_")
def setUp(self):
@@ -79,13 +81,13 @@
class PsycopgTests (Zope2SQLTests, unittest.TestCase):
dbapi_module = 'psycopg'
- class_name = 'PostgreSQLConnection'
+ class_name = 'apelib.sql.postgresql.PostgreSQLConnection'
connect_expression = 'connect("")'
class MySQLTests (Zope2SQLTests, unittest.TestCase):
dbapi_module = 'MySQLdb'
- class_name = 'MySQLConnection'
+ class_name = 'apelib.sql.mysql.MySQLConnection'
connect_expression = 'connect(db="ape")'
More information about the Zope-CVS
mailing list