Mercurial > p > roundup > code
diff test/db_test_base.py @ 2695:c26716932ffe
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.
| author | Alexander Smishlajev <a1s@users.sourceforge.net> |
|---|---|
| date | Tue, 28 Sep 2004 10:29:37 +0000 |
| parents | 9d044127c5eb |
| children | 93e2e5b55a3c |
line wrap: on
line diff
--- a/test/db_test_base.py Sun Sep 26 15:18:28 2004 +0000 +++ b/test/db_test_base.py Tue Sep 28 10:29:37 2004 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: db_test_base.py,v 1.46 2004-09-26 13:25:55 a1s Exp $ +# $Id: db_test_base.py,v 1.47 2004-09-28 10:29:37 a1s Exp $ import unittest, os, shutil, errno, imp, sys, time, pprint @@ -32,6 +32,8 @@ config.RDBMS_USER = "rounduptest" config.RDBMS_PASSWORD = "rounduptest" config.logging = MockNull() +# MAIL_DOMAIN is required for config.save() +config.MAIL_DOMAIN = "localhost" def setupSchema(db, create, module): status = module.Class(db, "status", name=String()) @@ -1341,7 +1343,6 @@ class ClassicInitTest(unittest.TestCase): count = 0 db = None - extra_config = '' def setUp(self): ClassicInitTest.count = ClassicInitTest.count + 1 @@ -1357,13 +1358,7 @@ # create the instance init.install(self.dirname, 'templates/classic') init.write_select_db(self.dirname, self.backend) - - if self.extra_config: - f = open(os.path.join(self.dirname, 'config.py'), 'a') - try: - f.write(self.extra_config) - finally: - f.close() + config.save(os.path.join(self.dirname, 'config.ini')) # check we can load the package tracker = instance.open(self.dirname)
