Skip to content

Commit e58ab45

Browse files
author
Richard Jones
committed
simpler RDBMS unit test config
1 parent 2fd3d7f commit e58ab45

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

test/test_mysql.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: test_mysql.py,v 1.9 2004-03-24 06:18:59 richard Exp $
18+
# $Id: test_mysql.py,v 1.10 2004-05-23 09:44:47 richard Exp $
1919

2020
import unittest, os, shutil, time, imp
2121

@@ -65,12 +65,13 @@ def setUp(self):
6565
class mysqlClassicInitTest(mysqlOpener, ClassicInitTest):
6666
backend = 'mysql'
6767
extra_config = '''
68-
MYSQL_DBHOST = 'localhost'
69-
MYSQL_DBUSER = 'rounduptest'
70-
MYSQL_DBPASSWORD = 'rounduptest'
71-
MYSQL_DBNAME = 'rounduptest'
72-
MYSQL_DATABASE = (MYSQL_DBHOST, MYSQL_DBUSER, MYSQL_DBPASSWORD, MYSQL_DBNAME)
73-
'''
68+
MYSQL_DBHOST = %r
69+
MYSQL_DBUSER = %r
70+
MYSQL_DBPASSWORD = %r
71+
MYSQL_DBNAME = %r
72+
MYSQL_DATABASE = %r
73+
'''%(config.MYSQL_DBHOST, config.MYSQL_DBUSER, config.MYSQL_DBPASSWORD,
74+
config.MYSQL_DBNAME, config.MYSQL_DATABASE)
7475
def setUp(self):
7576
mysqlOpener.setUp(self)
7677
ClassicInitTest.setUp(self)

test/test_postgresql.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: test_postgresql.py,v 1.9 2004-05-05 11:22:01 richard Exp $
18+
# $Id: test_postgresql.py,v 1.10 2004-05-23 09:44:47 richard Exp $
1919

2020
import unittest
2121

@@ -84,7 +84,7 @@ def tearDown(self):
8484

8585
class postgresqlClassicInitTest(postgresqlOpener, ClassicInitTest):
8686
backend = 'postgresql'
87-
extra_config = "POSTGRESQL_DATABASE = {'database': 'rounduptest'}"
87+
extra_config = "POSTGRESQL_DATABASE = %r"%config.POSTGRESQL_DATABASE
8888
def setUp(self):
8989
postgresqlOpener.setUp(self)
9090
ClassicInitTest.setUp(self)

0 commit comments

Comments
 (0)