|
15 | 15 | # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
16 | 16 | # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
17 | 17 | # |
18 | | -# $Id: test_init.py,v 1.16 2002-09-10 00:19:54 richard Exp $ |
| 18 | +# $Id: test_init.py,v 1.17 2002-09-10 01:27:13 richard Exp $ |
19 | 19 |
|
20 | 20 | import unittest, os, shutil, errno, imp, sys |
21 | 21 |
|
@@ -68,86 +68,35 @@ def testCreation(self): |
68 | 68 | l = db.issue.list() |
69 | 69 | ae(l, []) |
70 | 70 |
|
71 | | -class ExtendedTestCase(MyTestCase): |
72 | | - backend = 'anydbm' |
73 | | - def testCreation(self): |
74 | | - ae = self.assertEqual |
75 | | - |
76 | | - # create the instance |
77 | | - init.install(self.dirname, 'extended', self.backend) |
78 | | - init.initialise(self.dirname, 'sekrit') |
79 | | - |
80 | | - # check we can load the package |
81 | | - instance = imp.load_package(self.dirname, self.dirname) |
82 | | - |
83 | | - # and open the database |
84 | | - db = instance.open() |
85 | | - |
86 | | - # check the basics of the schema and initial data set |
87 | | - l = db.priority.list() |
88 | | - ae(l, ['1', '2', '3', '4']) |
89 | | - l = db.status.list() |
90 | | - ae(l, ['1', '2', '3', '4', '5', '6', '7', '8']) |
91 | | - l = db.keyword.list() |
92 | | - ae(l, []) |
93 | | - l = db.user.list() |
94 | | - ae(l, ['1', '2']) |
95 | | - l = db.msg.list() |
96 | | - ae(l, []) |
97 | | - l = db.file.list() |
98 | | - ae(l, []) |
99 | | - l = db.issue.list() |
100 | | - ae(l, []) |
101 | | - l = db.support.list() |
102 | | - ae(l, []) |
103 | | - l = db.rate.list() |
104 | | - ae(l, ['1', '2', '3']) |
105 | | - l = db.source.list() |
106 | | - ae(l, ['1', '2', '3', '4']) |
107 | | - l = db.platform.list() |
108 | | - ae(l, ['1', '2', '3']) |
109 | | - l = db.timelog.list() |
110 | | - ae(l, []) |
111 | | - |
112 | 71 | class bsddbClassicTestCase(ClassicTestCase): |
113 | 72 | backend = 'bsddb' |
114 | | -class bsddbExtendedTestCase(ExtendedTestCase): |
115 | | - backend = 'bsddb' |
116 | 73 |
|
117 | 74 | class bsddb3ClassicTestCase(ClassicTestCase): |
118 | 75 | backend = 'bsddb3' |
119 | | -class bsddb3ExtendedTestCase(ExtendedTestCase): |
120 | | - backend = 'bsddb3' |
121 | 76 |
|
122 | 77 | class metakitClassicTestCase(ClassicTestCase): |
123 | 78 | backend = 'metakit' |
124 | | -class metakitExtendedTestCase(ExtendedTestCase): |
125 | | - backend = 'metakit' |
126 | 79 |
|
127 | 80 | def suite(): |
128 | 81 | l = [ |
129 | 82 | unittest.makeSuite(ClassicTestCase, 'test'), |
130 | | - unittest.makeSuite(ExtendedTestCase, 'test') |
131 | 83 | ] |
132 | 84 |
|
133 | 85 | try: |
134 | 86 | import bsddb |
135 | 87 | l.append(unittest.makeSuite(bsddbClassicTestCase, 'test')) |
136 | | - l.append(unittest.makeSuite(bsddbExtendedTestCase, 'test')) |
137 | 88 | except: |
138 | 89 | print 'bsddb module not found, skipping bsddb DBTestCase' |
139 | 90 |
|
140 | 91 | try: |
141 | 92 | import bsddb3 |
142 | 93 | l.append(unittest.makeSuite(bsddb3ClassicTestCase, 'test')) |
143 | | - l.append(unittest.makeSuite(bsddb3ExtendedTestCase, 'test')) |
144 | 94 | except: |
145 | 95 | print 'bsddb3 module not found, skipping bsddb3 DBTestCase' |
146 | 96 |
|
147 | 97 | try: |
148 | 98 | import metakit |
149 | 99 | l.append(unittest.makeSuite(metakitClassicTestCase, 'test')) |
150 | | - l.append(unittest.makeSuite(metakitExtendedTestCase, 'test')) |
151 | 100 | except: |
152 | 101 | print 'metakit module not found, skipping metakit DBTestCase' |
153 | 102 |
|
|
0 commit comments