Mercurial > p > roundup > code
comparison test/test_schema.py @ 2714:7e6fac38d2b1
use new config object. fix vim modeline.
| author | Alexander Smishlajev <a1s@users.sourceforge.net> |
|---|---|
| date | Thu, 30 Sep 2004 10:34:26 +0000 |
| parents | f63aa57386b0 |
| children | 94bb67cc38a5 |
comparison
equal
deleted
inserted
replaced
| 2713:f5ae28302619 | 2714:7e6fac38d2b1 |
|---|---|
| 12 # BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, | 12 # BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, |
| 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" | 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" |
| 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, | 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
| 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 17 # | 17 # |
| 18 # $Id: test_schema.py,v 1.13 2003-10-25 22:53:26 richard Exp $ | 18 # $Id: test_schema.py,v 1.14 2004-09-30 10:34:26 a1s Exp $ |
| 19 | 19 |
| 20 import unittest, os, shutil | 20 import unittest, os, shutil |
| 21 | 21 |
| 22 from roundup import configuration | |
| 22 from roundup.backends import back_anydbm | 23 from roundup.backends import back_anydbm |
| 23 from roundup.hyperdb import String, Password, Link, Multilink, Date, \ | 24 from roundup.hyperdb import String, Password, Link, Multilink, Date, \ |
| 24 Interval | 25 Interval |
| 25 | 26 |
| 26 class config: | 27 config = configuration.CoreConfig() |
| 27 DATABASE='_test_dir' | 28 config.DATABASE = "_test_dir" |
| 28 MAILHOST = 'localhost' | |
| 29 MAIL_DOMAIN = 'fill.me.in.' | |
| 30 NSTANCE_NAME = 'Roundup issue tracker' | |
| 31 TRACKER_EMAIL = 'issue_tracker@%s'%MAIL_DOMAIN | |
| 32 TRACKER_WEB = 'http://some.useful.url/' | |
| 33 ADMIN_EMAIL = 'roundup-admin@%s'%MAIL_DOMAIN | |
| 34 FILTER_POSITION = 'bottom' # one of 'top', 'bottom', 'top and bottom' | |
| 35 ANONYMOUS_ACCESS = 'deny' # either 'deny' or 'allow' | |
| 36 ANONYMOUS_REGISTER = 'deny' # either 'deny' or 'allow' | |
| 37 MESSAGES_TO_AUTHOR = 'no' # either 'yes' or 'no' | |
| 38 EMAIL_SIGNATURE_POSITION = 'bottom' | |
| 39 | 29 |
| 40 class SchemaTestCase(unittest.TestCase): | 30 class SchemaTestCase(unittest.TestCase): |
| 41 def setUp(self): | 31 def setUp(self): |
| 42 # remove previous test, ignore errors | 32 # remove previous test, ignore errors |
| 43 if os.path.exists(config.DATABASE): | 33 if os.path.exists(config.DATABASE): |
| 93 if __name__ == '__main__': | 83 if __name__ == '__main__': |
| 94 runner = unittest.TextTestRunner() | 84 runner = unittest.TextTestRunner() |
| 95 unittest.main(testRunner=runner) | 85 unittest.main(testRunner=runner) |
| 96 | 86 |
| 97 | 87 |
| 98 # vim: set filetype=python ts=4 sw=4 et si | 88 # vim: set filetype=python sts=4 sw=4 et si : |
