3b9c9baa68a169fd021fc2cd2382bda1e7932333
1 #
2 # Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/)
3 # This module is free software, and you may redistribute it and/or modify
4 # under the same terms as Python, so long as this copyright message and
5 # disclaimer are retained in their original form.
6 #
7 # IN NO EVENT SHALL BIZAR SOFTWARE PTY LTD BE LIABLE TO ANY PARTY FOR
8 # DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING
9 # OUT OF THE USE OF THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE
10 # POSSIBILITY OF SUCH DAMAGE.
11 #
12 # BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
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"
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
17 #
18 # $Id: test_db.py,v 1.26 2002-07-11 01:11:03 richard Exp $
20 import unittest, os, shutil
22 from roundup.hyperdb import String, Password, Link, Multilink, Date, \
23 Interval, DatabaseError, Class
24 from roundup.roundupdb import FileClass
25 from roundup import date, password
26 from roundup.indexer import Indexer
28 def setupSchema(db, create, Class, FileClass):
29 status = Class(db, "status", name=String())
30 status.setkey("name")
31 user = Class(db, "user", username=String(), password=Password())
32 file = FileClass(db, "file", name=String(), type=String(),
33 comment=String(indexme="yes"))
34 issue = Class(db, "issue", title=String(indexme="yes"),
35 status=Link("status"), nosy=Multilink("user"), deadline=Date(),
36 foo=Interval(), files=Multilink("file"))
37 db.post_init()
38 if create:
39 status.create(name="unread")
40 status.create(name="in-progress")
41 status.create(name="testing")
42 status.create(name="resolved")
43 db.commit()
45 class MyTestCase(unittest.TestCase):
46 def tearDown(self):
47 if os.path.exists('_test_dir'):
48 shutil.rmtree('_test_dir')
50 class config:
51 DATABASE='_test_dir'
52 MAILHOST = 'localhost'
53 MAIL_DOMAIN = 'fill.me.in.'
54 INSTANCE_NAME = 'Roundup issue tracker'
55 ISSUE_TRACKER_EMAIL = 'issue_tracker@%s'%MAIL_DOMAIN
56 ISSUE_TRACKER_WEB = 'http://some.useful.url/'
57 ADMIN_EMAIL = 'roundup-admin@%s'%MAIL_DOMAIN
58 FILTER_POSITION = 'bottom' # one of 'top', 'bottom', 'top and bottom'
59 ANONYMOUS_ACCESS = 'deny' # either 'deny' or 'allow'
60 ANONYMOUS_REGISTER = 'deny' # either 'deny' or 'allow'
61 MESSAGES_TO_AUTHOR = 'no' # either 'yes' or 'no'
62 EMAIL_SIGNATURE_POSITION = 'bottom'
64 class anydbmDBTestCase(MyTestCase):
65 def setUp(self):
66 from roundup.backends import anydbm
67 # remove previous test, ignore errors
68 if os.path.exists(config.DATABASE):
69 shutil.rmtree(config.DATABASE)
70 os.makedirs(config.DATABASE + '/files')
71 self.db = anydbm.Database(config, 'test')
72 setupSchema(self.db, 1, Class, FileClass)
73 self.db2 = anydbm.Database(config, 'test')
74 setupSchema(self.db2, 0, Class, FileClass)
76 def testStringChange(self):
77 self.db.issue.create(title="spam", status='1')
78 self.assertEqual(self.db.issue.get('1', 'title'), 'spam')
79 self.db.issue.set('1', title='eggs')
80 self.assertEqual(self.db.issue.get('1', 'title'), 'eggs')
81 self.db.commit()
82 self.assertEqual(self.db.issue.get('1', 'title'), 'eggs')
83 self.db.issue.create(title="spam", status='1')
84 self.db.commit()
85 self.assertEqual(self.db.issue.get('2', 'title'), 'spam')
86 self.db.issue.set('2', title='ham')
87 self.assertEqual(self.db.issue.get('2', 'title'), 'ham')
88 self.db.commit()
89 self.assertEqual(self.db.issue.get('2', 'title'), 'ham')
91 def testLinkChange(self):
92 self.db.issue.create(title="spam", status='1')
93 self.assertEqual(self.db.issue.get('1', "status"), '1')
94 self.db.issue.set('1', status='2')
95 self.assertEqual(self.db.issue.get('1', "status"), '2')
97 def testDateChange(self):
98 self.db.issue.create(title="spam", status='1')
99 a = self.db.issue.get('1', "deadline")
100 self.db.issue.set('1', deadline=date.Date())
101 b = self.db.issue.get('1', "deadline")
102 self.db.commit()
103 self.assertNotEqual(a, b)
104 self.assertNotEqual(b, date.Date('1970-1-1 00:00:00'))
105 self.db.issue.set('1', deadline=date.Date())
107 def testIntervalChange(self):
108 self.db.issue.create(title="spam", status='1')
109 a = self.db.issue.get('1', "foo")
110 self.db.issue.set('1', foo=date.Interval('-1d'))
111 self.assertNotEqual(self.db.issue.get('1', "foo"), a)
113 def testNewProperty(self):
114 ' make sure a new property is added ok '
115 self.db.issue.create(title="spam", status='1')
116 self.db.issue.addprop(fixer=Link("user"))
117 props = self.db.issue.getprops()
118 keys = props.keys()
119 keys.sort()
120 self.assertEqual(keys, ['deadline', 'files', 'fixer', 'foo', 'id',
121 'nosy', 'status', 'title'])
122 self.assertEqual(self.db.issue.get('1', "fixer"), None)
124 def testRetire(self):
125 self.db.issue.create(title="spam", status='1')
126 b = self.db.status.get('1', 'name')
127 a = self.db.status.list()
128 self.db.status.retire('1')
129 # make sure the list is different
130 self.assertNotEqual(a, self.db.status.list())
131 # can still access the node if necessary
132 self.assertEqual(self.db.status.get('1', 'name'), b)
133 self.db.commit()
134 self.assertEqual(self.db.status.get('1', 'name'), b)
135 self.assertNotEqual(a, self.db.status.list())
137 def testSerialisation(self):
138 self.db.issue.create(title="spam", status='1',
139 deadline=date.Date(), foo=date.Interval('-1d'))
140 self.db.commit()
141 assert isinstance(self.db.issue.get('1', 'deadline'), date.Date)
142 assert isinstance(self.db.issue.get('1', 'foo'), date.Interval)
143 self.db.user.create(username="fozzy",
144 password=password.Password('t. bear'))
145 self.db.commit()
146 assert isinstance(self.db.user.get('1', 'password'), password.Password)
148 def testTransactions(self):
149 # remember the number of items we started
150 num_issues = len(self.db.issue.list())
151 num_files = self.db.numfiles()
152 self.db.issue.create(title="don't commit me!", status='1')
153 self.assertNotEqual(num_issues, len(self.db.issue.list()))
154 self.db.rollback()
155 self.assertEqual(num_issues, len(self.db.issue.list()))
156 self.db.issue.create(title="please commit me!", status='1')
157 self.assertNotEqual(num_issues, len(self.db.issue.list()))
158 self.db.commit()
159 self.assertNotEqual(num_issues, len(self.db.issue.list()))
160 self.db.rollback()
161 self.assertNotEqual(num_issues, len(self.db.issue.list()))
162 self.db.file.create(name="test", type="text/plain", content="hi")
163 self.db.rollback()
164 self.assertEqual(num_files, self.db.numfiles())
165 for i in range(10):
166 self.db.file.create(name="test", type="text/plain",
167 content="hi %d"%(i))
168 self.db.commit()
169 num_files2 = self.db.numfiles()
170 self.assertNotEqual(num_files, num_files2)
171 self.db.file.create(name="test", type="text/plain", content="hi")
172 self.db.rollback()
173 self.assertNotEqual(num_files, self.db.numfiles())
174 self.assertEqual(num_files2, self.db.numfiles())
176 def testExceptions(self):
177 # this tests the exceptions that should be raised
178 ar = self.assertRaises
180 #
181 # class create
182 #
183 # string property
184 ar(TypeError, self.db.status.create, name=1)
185 # invalid property name
186 ar(KeyError, self.db.status.create, foo='foo')
187 # key name clash
188 ar(ValueError, self.db.status.create, name='unread')
189 # invalid link index
190 ar(IndexError, self.db.issue.create, title='foo', status='bar')
191 # invalid link value
192 ar(ValueError, self.db.issue.create, title='foo', status=1)
193 # invalid multilink type
194 ar(TypeError, self.db.issue.create, title='foo', status='1',
195 nosy='hello')
196 # invalid multilink index type
197 ar(ValueError, self.db.issue.create, title='foo', status='1',
198 nosy=[1])
199 # invalid multilink index
200 ar(IndexError, self.db.issue.create, title='foo', status='1',
201 nosy=['10'])
203 #
204 # class get
205 #
206 # invalid node id
207 ar(IndexError, self.db.issue.get, '1', 'title')
208 # invalid property name
209 ar(KeyError, self.db.status.get, '2', 'foo')
211 #
212 # class set
213 #
214 # invalid node id
215 ar(IndexError, self.db.issue.set, '1', title='foo')
216 # invalid property name
217 ar(KeyError, self.db.status.set, '1', foo='foo')
218 # string property
219 ar(TypeError, self.db.status.set, '1', name=1)
220 # key name clash
221 ar(ValueError, self.db.status.set, '2', name='unread')
222 # set up a valid issue for me to work on
223 self.db.issue.create(title="spam", status='1')
224 # invalid link index
225 ar(IndexError, self.db.issue.set, '6', title='foo', status='bar')
226 # invalid link value
227 ar(ValueError, self.db.issue.set, '6', title='foo', status=1)
228 # invalid multilink type
229 ar(TypeError, self.db.issue.set, '6', title='foo', status='1',
230 nosy='hello')
231 # invalid multilink index type
232 ar(ValueError, self.db.issue.set, '6', title='foo', status='1',
233 nosy=[1])
234 # invalid multilink index
235 ar(IndexError, self.db.issue.set, '6', title='foo', status='1',
236 nosy=['10'])
238 def testJournals(self):
239 self.db.issue.addprop(fixer=Link("user", do_journal='yes'))
240 self.db.user.create(username="mary")
241 self.db.user.create(username="pete")
242 self.db.issue.create(title="spam", status='1')
243 self.db.commit()
245 # journal entry for issue create
246 journal = self.db.getjournal('issue', '1')
247 self.assertEqual(1, len(journal))
248 (nodeid, date_stamp, journaltag, action, params) = journal[0]
249 self.assertEqual(nodeid, '1')
250 self.assertEqual(journaltag, 'test')
251 self.assertEqual(action, 'create')
252 keys = params.keys()
253 keys.sort()
254 self.assertEqual(keys, ['deadline', 'files', 'fixer', 'foo', 'nosy',
255 'status', 'title'])
256 self.assertEqual(None,params['deadline'])
257 self.assertEqual(None,params['fixer'])
258 self.assertEqual(None,params['foo'])
259 self.assertEqual([],params['nosy'])
260 self.assertEqual('1',params['status'])
261 self.assertEqual('spam',params['title'])
263 # journal entry for link
264 journal = self.db.getjournal('user', '1')
265 self.assertEqual(1, len(journal))
266 self.db.issue.set('1', fixer='1')
267 self.db.commit()
268 journal = self.db.getjournal('user', '1')
269 self.assertEqual(2, len(journal))
270 (nodeid, date_stamp, journaltag, action, params) = journal[1]
271 self.assertEqual('1', nodeid)
272 self.assertEqual('test', journaltag)
273 self.assertEqual('link', action)
274 self.assertEqual(('issue', '1', 'fixer'), params)
276 # journal entry for unlink
277 self.db.issue.set('1', fixer='2')
278 self.db.commit()
279 journal = self.db.getjournal('user', '1')
280 self.assertEqual(3, len(journal))
281 (nodeid, date_stamp, journaltag, action, params) = journal[2]
282 self.assertEqual('1', nodeid)
283 self.assertEqual('test', journaltag)
284 self.assertEqual('unlink', action)
285 self.assertEqual(('issue', '1', 'fixer'), params)
287 def testPack(self):
288 self.db.issue.create(title="spam", status='1')
289 self.db.commit()
290 self.db.issue.set('1', status='2')
291 self.db.commit()
292 self.db.issue.set('1', status='3')
293 self.db.commit()
294 pack_before = date.Date(". + 1d")
295 self.db.pack(pack_before)
296 journal = self.db.getjournal('issue', '1')
297 self.assertEqual(2, len(journal))
299 def testIDGeneration(self):
300 id1 = self.db.issue.create(title="spam", status='1')
301 id2 = self.db2.issue.create(title="eggs", status='2')
302 self.assertNotEqual(id1, id2)
304 def testSearching(self):
305 self.db.file.create(content='hello', type="text/plain")
306 self.db.file.create(content='world', type="text/frozz",
307 comment='blah blah')
308 self.db.issue.create(files=['1', '2'], title="flebble plop")
309 self.db.issue.create(title="flebble frooz")
310 self.db.commit()
311 self.assertEquals(self.db.indexer.search(['hello'], self.db.issue),
312 {'1': {'files': ['1']}})
313 self.assertEquals(self.db.indexer.search(['world'], self.db.issue), {})
314 self.assertEquals(self.db.indexer.search(['frooz'], self.db.issue),
315 {'2': {}})
316 self.assertEquals(self.db.indexer.search(['flebble'], self.db.issue),
317 {'2': {}, '1': {}})
319 def testReindexing(self):
320 self.db.issue.create(title="frooz")
321 self.db.commit()
322 self.assertEquals(self.db.indexer.search(['frooz'], self.db.issue),
323 {'1': {}})
324 self.db.issue.set('1', title="dooble")
325 self.db.commit()
326 self.assertEquals(self.db.indexer.search(['dooble'], self.db.issue),
327 {'1': {}})
328 self.assertEquals(self.db.indexer.search(['frooz'], self.db.issue), {})
330 def testForcedReindexing(self):
331 self.db.issue.create(title="flebble frooz")
332 self.db.commit()
333 self.assertEquals(self.db.indexer.search(['flebble'], self.db.issue),
334 {'1': {}})
335 self.db.indexer.quiet = 1
336 self.db.indexer.force_reindex()
337 self.db.post_init()
338 self.db.indexer.quiet = 9
339 self.assertEquals(self.db.indexer.search(['flebble'], self.db.issue),
340 {'1': {}})
342 class anydbmReadOnlyDBTestCase(MyTestCase):
343 def setUp(self):
344 from roundup.backends import anydbm
345 # remove previous test, ignore errors
346 if os.path.exists(config.DATABASE):
347 shutil.rmtree(config.DATABASE)
348 os.makedirs(config.DATABASE + '/files')
349 db = anydbm.Database(config, 'test')
350 setupSchema(db, 1, Class, FileClass)
351 self.db = anydbm.Database(config)
352 setupSchema(self.db, 0, Class, FileClass)
353 self.db2 = anydbm.Database(config, 'test')
354 setupSchema(self.db2, 0, Class, FileClass)
356 def testExceptions(self):
357 ' make sure exceptions are raised on writes to a read-only db '
358 # this tests the exceptions that should be raised
359 ar = self.assertRaises
361 # this tests the exceptions that should be raised
362 ar(DatabaseError, self.db.status.create, name="foo")
363 ar(DatabaseError, self.db.status.set, '1', name="foo")
364 ar(DatabaseError, self.db.status.retire, '1')
367 class bsddbDBTestCase(anydbmDBTestCase):
368 def setUp(self):
369 from roundup.backends import bsddb
370 # remove previous test, ignore errors
371 if os.path.exists(config.DATABASE):
372 shutil.rmtree(config.DATABASE)
373 os.makedirs(config.DATABASE + '/files')
374 self.db = bsddb.Database(config, 'test')
375 setupSchema(self.db, 1, Class, FileClass)
376 self.db2 = bsddb.Database(config, 'test')
377 setupSchema(self.db2, 0, Class, FileClass)
379 class bsddbReadOnlyDBTestCase(anydbmReadOnlyDBTestCase):
380 def setUp(self):
381 from roundup.backends import bsddb
382 # remove previous test, ignore errors
383 if os.path.exists(config.DATABASE):
384 shutil.rmtree(config.DATABASE)
385 os.makedirs(config.DATABASE + '/files')
386 db = bsddb.Database(config, 'test')
387 setupSchema(db, 1, Class, FileClass)
388 self.db = bsddb.Database(config)
389 setupSchema(self.db, 0, Class, FileClass)
390 self.db2 = bsddb.Database(config, 'test')
391 setupSchema(self.db2, 0, Class, FileClass)
394 class bsddb3DBTestCase(anydbmDBTestCase):
395 def setUp(self):
396 from roundup.backends import bsddb3
397 # remove previous test, ignore errors
398 if os.path.exists(config.DATABASE):
399 shutil.rmtree(config.DATABASE)
400 os.makedirs(config.DATABASE + '/files')
401 self.db = bsddb3.Database(config, 'test')
402 setupSchema(self.db, 1, Class, FileClass)
403 self.db2 = bsddb3.Database(config, 'test')
404 setupSchema(self.db2, 0, Class, FileClass)
406 class bsddb3ReadOnlyDBTestCase(anydbmReadOnlyDBTestCase):
407 def setUp(self):
408 from roundup.backends import bsddb3
409 # remove previous test, ignore errors
410 if os.path.exists(config.DATABASE):
411 shutil.rmtree(config.DATABASE)
412 os.makedirs(config.DATABASE + '/files')
413 db = bsddb3.Database(config, 'test')
414 setupSchema(db, 1, Class, FileClass)
415 self.db = bsddb3.Database(config)
416 setupSchema(self.db, 0, Class, FileClass)
417 self.db2 = bsddb3.Database(config, 'test')
418 setupSchema(self.db2, 0, Class, FileClass)
421 class metakitDBTestCase(anydbmDBTestCase):
422 def setUp(self):
423 from roundup.backends import metakit
424 import weakref
425 metakit._instances = weakref.WeakValueDictionary()
426 # remove previous test, ignore errors
427 if os.path.exists(config.DATABASE):
428 shutil.rmtree(config.DATABASE)
429 os.makedirs(config.DATABASE + '/files')
430 self.db = metakit.Database(config, 'test')
431 setupSchema(self.db, 1, metakit.Class, metakit.FileClass)
432 self.db2 = metakit.Database(config, 'test')
433 setupSchema(self.db2, 0, metakit.Class, metakit.FileClass)
435 def testTransactions(self):
436 # remember the number of items we started
437 num_issues = len(self.db.issue.list())
438 self.db.issue.create(title="don't commit me!", status='1')
439 self.assertNotEqual(num_issues, len(self.db.issue.list()))
440 self.db.rollback()
441 self.assertEqual(num_issues, len(self.db.issue.list()))
442 self.db.issue.create(title="please commit me!", status='1')
443 self.assertNotEqual(num_issues, len(self.db.issue.list()))
444 self.db.commit()
445 self.assertNotEqual(num_issues, len(self.db.issue.list()))
446 self.db.rollback()
447 self.assertNotEqual(num_issues, len(self.db.issue.list()))
448 self.db.file.create(name="test", type="text/plain", content="hi")
449 self.db.rollback()
450 for i in range(10):
451 self.db.file.create(name="test", type="text/plain",
452 content="hi %d"%(i))
453 self.db.commit()
454 # TODO: would be good to be able to ensure the file is not on disk after
455 # a rollback...
456 self.assertNotEqual(num_files, num_files2)
457 self.db.file.create(name="test", type="text/plain", content="hi")
458 self.db.rollback()
460 def testNewProperty(self):
461 ' make sure a new property is added ok '
462 self.db.issue.create(title="spam", status='1')
463 self.db.issue.addprop(fixer=Link("user"))
464 props = self.db.issue.getprops()
465 keys = props.keys()
466 keys.sort()
467 # metakit _base_ Class has the activity, creation and creator too
468 self.assertEqual(keys, ['activity', 'creation', 'creator',
469 'deadline', 'files', 'fixer', 'foo', 'id', 'nosy', 'status',
470 'title'])
471 self.assertEqual(self.db.issue.get('1', "fixer"), None)
473 class metakitReadOnlyDBTestCase(anydbmReadOnlyDBTestCase):
474 def setUp(self):
475 from roundup.backends import metakit
476 import weakref
477 metakit._instances = weakref.WeakValueDictionary()
478 # remove previous test, ignore errors
479 if os.path.exists(config.DATABASE):
480 shutil.rmtree(config.DATABASE)
481 os.makedirs(config.DATABASE + '/files')
482 db = metakit.Database(config, 'test')
483 setupSchema(db, 1, metakit.Class, metakit.FileClass)
484 self.db = metakit.Database(config)
485 setupSchema(self.db, 0, metakit.Class, metakit.FileClass)
486 self.db2 = metakit.Database(config, 'test')
487 setupSchema(self.db2, 0, metakit.Class, metakit.FileClass)
489 def suite():
490 l = [
491 unittest.makeSuite(anydbmDBTestCase, 'test'),
492 unittest.makeSuite(anydbmReadOnlyDBTestCase, 'test')
493 ]
495 try:
496 import bsddb
497 l.append(unittest.makeSuite(bsddbDBTestCase, 'test'))
498 l.append(unittest.makeSuite(bsddbReadOnlyDBTestCase, 'test'))
499 except:
500 print 'bsddb module not found, skipping bsddb DBTestCase'
502 try:
503 import bsddb3
504 l.append(unittest.makeSuite(bsddb3DBTestCase, 'test'))
505 l.append(unittest.makeSuite(bsddb3ReadOnlyDBTestCase, 'test'))
506 except:
507 print 'bsddb3 module not found, skipping bsddb3 DBTestCase'
509 try:
510 import metakit
511 l.append(unittest.makeSuite(metakitDBTestCase, 'test'))
512 l.append(unittest.makeSuite(metakitReadOnlyDBTestCase, 'test'))
513 except:
514 print 'metakit module not found, skipping metakit DBTestCase'
516 return unittest.TestSuite(l)
518 #
519 # $Log: not supported by cvs2svn $
520 # Revision 1.25 2002/07/09 04:19:09 richard
521 # Added reindex command to roundup-admin.
522 # Fixed reindex on first access.
523 # Also fixed reindexing of entries that change.
524 #
525 # Revision 1.24 2002/07/09 03:02:53 richard
526 # More indexer work:
527 # - all String properties may now be indexed too. Currently there's a bit of
528 # "issue" specific code in the actual searching which needs to be
529 # addressed. In a nutshell:
530 # + pass 'indexme="yes"' as a String() property initialisation arg, eg:
531 # file = FileClass(db, "file", name=String(), type=String(),
532 # comment=String(indexme="yes"))
533 # + the comment will then be indexed and be searchable, with the results
534 # related back to the issue that the file is linked to
535 # - as a result of this work, the FileClass has a default MIME type that may
536 # be overridden in a subclass, or by the use of a "type" property as is
537 # done in the default templates.
538 # - the regeneration of the indexes (if necessary) is done once the schema is
539 # set up in the dbinit.
540 #
541 # Revision 1.23 2002/06/20 23:51:48 richard
542 # Cleaned up the hyperdb tests
543 #
544 # Revision 1.22 2002/05/21 05:52:11 richard
545 # Well whadya know, bsddb3 works again.
546 # The backend is implemented _exactly_ the same as bsddb - so there's no
547 # using its transaction or locking support. It'd be nice to use those some
548 # day I suppose.
549 #
550 # Revision 1.21 2002/04/15 23:25:15 richard
551 # . node ids are now generated from a lockable store - no more race conditions
552 #
553 # We're using the portalocker code by Jonathan Feinberg that was contributed
554 # to the ASPN Python cookbook. This gives us locking across Unix and Windows.
555 #
556 # Revision 1.20 2002/04/03 05:54:31 richard
557 # Fixed serialisation problem by moving the serialisation step out of the
558 # hyperdb.Class (get, set) into the hyperdb.Database.
559 #
560 # Also fixed htmltemplate after the showid changes I made yesterday.
561 #
562 # Unit tests for all of the above written.
563 #
564 # Revision 1.19 2002/02/25 14:34:31 grubert
565 # . use blobfiles in back_anydbm which is used in back_bsddb.
566 # change test_db as dirlist does not work for subdirectories.
567 # ATTENTION: blobfiles now creates subdirectories for files.
568 #
569 # Revision 1.18 2002/01/22 07:21:13 richard
570 # . fixed back_bsddb so it passed the journal tests
571 #
572 # ... it didn't seem happy using the back_anydbm _open method, which is odd.
573 # Yet another occurrance of whichdb not being able to recognise older bsddb
574 # databases. Yadda yadda. Made the HYPERDBDEBUG stuff more sane in the
575 # process.
576 #
577 # Revision 1.17 2002/01/22 05:06:09 rochecompaan
578 # We need to keep the last 'set' entry in the journal to preserve
579 # information on 'activity' for nodes.
580 #
581 # Revision 1.16 2002/01/21 16:33:20 rochecompaan
582 # You can now use the roundup-admin tool to pack the database
583 #
584 # Revision 1.15 2002/01/19 13:16:04 rochecompaan
585 # Journal entries for link and multilink properties can now be switched on
586 # or off.
587 #
588 # Revision 1.14 2002/01/16 07:02:57 richard
589 # . lots of date/interval related changes:
590 # - more relaxed date format for input
591 #
592 # Revision 1.13 2002/01/14 02:20:15 richard
593 # . changed all config accesses so they access either the instance or the
594 # config attriubute on the db. This means that all config is obtained from
595 # instance_config instead of the mish-mash of classes. This will make
596 # switching to a ConfigParser setup easier too, I hope.
597 #
598 # At a minimum, this makes migration a _little_ easier (a lot easier in the
599 # 0.5.0 switch, I hope!)
600 #
601 # Revision 1.12 2001/12/17 03:52:48 richard
602 # Implemented file store rollback. As a bonus, the hyperdb is now capable of
603 # storing more than one file per node - if a property name is supplied,
604 # the file is called designator.property.
605 # I decided not to migrate the existing files stored over to the new naming
606 # scheme - the FileClass just doesn't specify the property name.
607 #
608 # Revision 1.11 2001/12/10 23:17:20 richard
609 # Added transaction tests to test_db
610 #
611 # Revision 1.10 2001/12/03 21:33:39 richard
612 # Fixes so the tests use commit and not close
613 #
614 # Revision 1.9 2001/12/02 05:06:16 richard
615 # . We now use weakrefs in the Classes to keep the database reference, so
616 # the close() method on the database is no longer needed.
617 # I bumped the minimum python requirement up to 2.1 accordingly.
618 # . #487480 ] roundup-server
619 # . #487476 ] INSTALL.txt
620 #
621 # I also cleaned up the change message / post-edit stuff in the cgi client.
622 # There's now a clearly marked "TODO: append the change note" where I believe
623 # the change note should be added there. The "changes" list will obviously
624 # have to be modified to be a dict of the changes, or somesuch.
625 #
626 # More testing needed.
627 #
628 # Revision 1.8 2001/10/09 07:25:59 richard
629 # Added the Password property type. See "pydoc roundup.password" for
630 # implementation details. Have updated some of the documentation too.
631 #
632 # Revision 1.7 2001/08/29 06:23:59 richard
633 # Disabled the bsddb3 module entirely in the unit testing. See CHANGES for
634 # details.
635 #
636 # Revision 1.6 2001/08/07 00:24:43 richard
637 # stupid typo
638 #
639 # Revision 1.5 2001/08/07 00:15:51 richard
640 # Added the copyright/license notice to (nearly) all files at request of
641 # Bizar Software.
642 #
643 # Revision 1.4 2001/07/30 03:45:56 richard
644 # Added more DB to test_db. Can skip tests where imports fail.
645 #
646 # Revision 1.3 2001/07/29 07:01:39 richard
647 # Added vim command to all source so that we don't get no steenkin' tabs :)
648 #
649 # Revision 1.2 2001/07/29 04:09:20 richard
650 # Added the fabricated property "id" to all hyperdb classes.
651 #
652 # Revision 1.1 2001/07/27 06:55:07 richard
653 # moving tests -> test
654 #
655 # Revision 1.7 2001/07/27 06:26:43 richard
656 # oops - wasn't deleting the test dir after the read-only tests
657 #
658 # Revision 1.6 2001/07/27 06:23:59 richard
659 # consistency
660 #
661 # Revision 1.5 2001/07/27 06:23:09 richard
662 # Added some new hyperdb tests to make sure we raise the right exceptions.
663 #
664 # Revision 1.4 2001/07/25 04:34:31 richard
665 # Added id and log to tests files...
666 #
667 #
668 # vim: set filetype=python ts=4 sw=4 et si