Skip to content

Commit fcd60f1

Browse files
author
Alexander Smishlajev
committed
testCreation: after installing new tracker, save test config...
...to override default database connection parameters (test system must use database 'rounduptest', not default 'roundup'). remove extra_config string - not used with new config object.
1 parent 2a064d7 commit fcd60f1

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

test/db_test_base.py

Lines changed: 4 additions & 9 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: db_test_base.py,v 1.46 2004-09-26 13:25:55 a1s Exp $
18+
# $Id: db_test_base.py,v 1.47 2004-09-28 10:29:37 a1s Exp $
1919

2020
import unittest, os, shutil, errno, imp, sys, time, pprint
2121

@@ -32,6 +32,8 @@
3232
config.RDBMS_USER = "rounduptest"
3333
config.RDBMS_PASSWORD = "rounduptest"
3434
config.logging = MockNull()
35+
# MAIL_DOMAIN is required for config.save()
36+
config.MAIL_DOMAIN = "localhost"
3537

3638
def setupSchema(db, create, module):
3739
status = module.Class(db, "status", name=String())
@@ -1341,7 +1343,6 @@ def test_indexTest(self):
13411343
class ClassicInitTest(unittest.TestCase):
13421344
count = 0
13431345
db = None
1344-
extra_config = ''
13451346

13461347
def setUp(self):
13471348
ClassicInitTest.count = ClassicInitTest.count + 1
@@ -1357,13 +1358,7 @@ def testCreation(self):
13571358
# create the instance
13581359
init.install(self.dirname, 'templates/classic')
13591360
init.write_select_db(self.dirname, self.backend)
1360-
1361-
if self.extra_config:
1362-
f = open(os.path.join(self.dirname, 'config.py'), 'a')
1363-
try:
1364-
f.write(self.extra_config)
1365-
finally:
1366-
f.close()
1361+
config.save(os.path.join(self.dirname, 'config.ini'))
13671362

13681363
# check we can load the package
13691364
tracker = instance.open(self.dirname)

0 commit comments

Comments
 (0)