comparison test/test_schema.py @ 602:c242455d9b46 config-0-4-0-branch

Brought the config branch up to date with HEAD
author Richard Jones <richard@users.sourceforge.net>
date Wed, 06 Feb 2002 04:05:55 +0000
parents f97415cccb9d
children
comparison
equal deleted inserted replaced
601:912029653c1c 602:c242455d9b46
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.6 2001-12-03 21:33:39 richard Exp $ 18 # $Id: test_schema.py,v 1.6.2.1 2002-02-06 04:05:55 richard Exp $
19 19
20 import unittest, os, shutil 20 import unittest, os, shutil
21 21
22 from roundup.backends import anydbm 22 from roundup.backends import anydbm
23 from roundup.hyperdb import String, Password, Link, Multilink, Date, \ 23 from roundup.hyperdb import String, Password, Link, Multilink, Date, \
24 Interval, Class 24 Interval, Class
25 25
26 class config:
27 DATABASE='_test_dir'
28 MAILHOST = 'localhost'
29 MAIL_DOMAIN = 'fill.me.in.'
30 INSTANCE_NAME = 'Roundup issue tracker'
31 ISSUE_TRACKER_EMAIL = 'issue_tracker@%s'%MAIL_DOMAIN
32 ISSUE_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
26 class SchemaTestCase(unittest.TestCase): 40 class SchemaTestCase(unittest.TestCase):
27 def setUp(self): 41 def setUp(self):
28 class Database(anydbm.Database): 42 class Database(anydbm.Database):
29 pass 43 pass
30 # remove previous test, ignore errors 44 # remove previous test, ignore errors
31 if os.path.exists('_test_dir'): 45 if os.path.exists(config.DATABASE):
32 shutil.rmtree('_test_dir') 46 shutil.rmtree(config.DATABASE)
33 os.mkdir('_test_dir') 47 os.makedirs(config.DATABASE + '/files')
34 self.db = Database('_test_dir', 'test') 48 self.db = Database(config, 'test')
35 self.db.clear() 49 self.db.clear()
36 50
37 def tearDown(self): 51 def tearDown(self):
38 shutil.rmtree('_test_dir') 52 shutil.rmtree('_test_dir')
39 53
73 return unittest.makeSuite(SchemaTestCase, 'test') 87 return unittest.makeSuite(SchemaTestCase, 'test')
74 88
75 89
76 # 90 #
77 # $Log: not supported by cvs2svn $ 91 # $Log: not supported by cvs2svn $
92 # Revision 1.7 2002/01/14 02:20:15 richard
93 # . changed all config accesses so they access either the instance or the
94 # config attriubute on the db. This means that all config is obtained from
95 # instance_config instead of the mish-mash of classes. This will make
96 # switching to a ConfigParser setup easier too, I hope.
97 #
98 # At a minimum, this makes migration a _little_ easier (a lot easier in the
99 # 0.5.0 switch, I hope!)
100 #
101 # Revision 1.6 2001/12/03 21:33:39 richard
102 # Fixes so the tests use commit and not close
103 #
78 # Revision 1.5 2001/10/09 07:25:59 richard 104 # Revision 1.5 2001/10/09 07:25:59 richard
79 # Added the Password property type. See "pydoc roundup.password" for 105 # Added the Password property type. See "pydoc roundup.password" for
80 # implementation details. Have updated some of the documentation too. 106 # implementation details. Have updated some of the documentation too.
81 # 107 #
82 # Revision 1.4 2001/08/07 00:24:43 richard 108 # Revision 1.4 2001/08/07 00:24:43 richard

Roundup Issue Tracker: http://roundup-tracker.org/