Mercurial > p > roundup > code
comparison test/db_test_base.py @ 5041:5251e97b1de0
Configure the database backend in the config.ini
The database backend is currently configured in the 'db/backend_name'
file which is just another file that needs to be configured when setting
up or migrating a tracker instance. By moving this setting into the
config.ini it helps to reduce the number of files that need to be
configured and is more logical place for users to find the setting.
| author | John Kristensen <john@jerrykan.com> |
|---|---|
| date | Mon, 22 Dec 2014 13:30:20 +1100 |
| parents | 380d8d8b30a3 |
| children | e424987d294a |
comparison
equal
deleted
inserted
replaced
| 5040:f52a9fb035d2 | 5041:5251e97b1de0 |
|---|---|
| 63 '..', | 63 '..', |
| 64 'share', | 64 'share', |
| 65 'roundup', | 65 'roundup', |
| 66 'templates', | 66 'templates', |
| 67 'classic')) | 67 'classic')) |
| 68 init.write_select_db(dirname, backend) | 68 config.RDBMS_BACKEND = backend |
| 69 config.save(os.path.join(dirname, 'config.ini')) | 69 config.save(os.path.join(dirname, 'config.ini')) |
| 70 tracker = instance.open(dirname) | 70 tracker = instance.open(dirname) |
| 71 if tracker.exists(): | 71 if tracker.exists(): |
| 72 tracker.nuke() | 72 tracker.nuke() |
| 73 init.write_select_db(dirname, backend) | |
| 74 tracker.init(password.Password('sekrit')) | 73 tracker.init(password.Password('sekrit')) |
| 75 return tracker | 74 return tracker |
| 76 | 75 |
| 77 def setupSchema(db, create, module): | 76 def setupSchema(db, create, module): |
| 78 mls = module.Class(db, "mls", name=String()) | 77 mls = module.Class(db, "mls", name=String()) |
