[Zope-Checkins] CVS: Products/DCOracle2/test -
test_dcoracle2_dbapi20.py:1.2 common.py:1.7
Chris Withers
cvs-admin at zope.org
Fri Oct 24 06:50:06 EDT 2003
Update of /cvs-repository/Products/DCOracle2/test
In directory cvs.zope.org:/tmp/cvs-serv22020
Modified Files:
test_dcoracle2_dbapi20.py common.py
Log Message:
Un-hard code connection string for tests.
=== Products/DCOracle2/test/test_dcoracle2_dbapi20.py 1.1 => 1.2 ===
--- Products/DCOracle2/test/test_dcoracle2_dbapi20.py:1.1 Thu Feb 13 19:01:21 2003
+++ Products/DCOracle2/test/test_dcoracle2_dbapi20.py Fri Oct 24 06:50:03 2003
@@ -11,9 +11,11 @@
import DCOracle2 as DB
import popen2
+from common import getConnectionString
+
class test_DCOracle2(dbapi20.test_DBAPI20,unittest.TestCase):
driver = DB
- connect_args = ('scott/tiger',)
+ connect_args = (getConnectionString(),)
connect_kw_args = {}
ddl1 = 'create table booze (name varchar2(64))'
=== Products/DCOracle2/test/common.py 1.6 => 1.7 ===
--- Products/DCOracle2/test/common.py:1.6 Mon Jul 15 10:12:52 2002
+++ Products/DCOracle2/test/common.py Fri Oct 24 06:50:03 2003
@@ -17,5 +17,13 @@
def getConnectionString():
hostname = os.uname()[1]
+ # support for historical pairs above
if connstrings.has_key(hostname): return connstrings[hostname]
- raise KeyError, "Unknown testing host, please add to common.py"
+
+ # look at the environment variables
+ connstring = os.environ.get('DCORACLE_TEST_CONNSTRING')
+ if connstring:
+ return connstring
+
+ raise KeyError,"Please specify connection string for tests in "\
+ "DCORACLE_TEST_CONNSTRING environment variable"
More information about the Zope-Checkins
mailing list