1bfc15ed7a2004a5b5b422d0d8714071f4a4ab8b
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.28 2002-07-14 02:16:29 richard Exp $
20 import unittest, os, shutil
22 from roundup.hyperdb import String, Password, Link, Multilink, Date, \
23 Interval, DatabaseError
24 from roundup import date, password
25 from roundup.indexer import Indexer
27 def setupSchema(db, create, module):
28 status = module.Class(db, "status", name=String())
29 status.setkey("name")
30 user = module.Class(db, "user", username=String(), password=Password())
31 file = module.FileClass(db, "file", name=String(), type=String(),
32 comment=String(indexme="yes"))
33 issue = module.IssueClass(db, "issue", title=String(indexme="yes"),
34 status=Link("status"), nosy=Multilink("user"), deadline=Date(),
35 foo=Interval(), files=Multilink("file"))
36 db.post_init()
37 if create:
38 status.create(name="unread")
39 status.create(name="in-progress")
40 status.create(name="testing")
41 status.create(name="resolved")
42 db.commit()
44 class MyTestCase(unittest.TestCase):
45 def tearDown(self):
46 if os.path.exists('_test_dir'):
47 shutil.rmtree('_test_dir')
49 class config:
50 DATABASE='_test_dir'
51 MAILHOST = 'localhost'
52 MAIL_DOMAIN = 'fill.me.in.'
53 INSTANCE_NAME = 'Roundup issue tracker'
54 ISSUE_TRACKER_EMAIL = 'issue_tracker@%s'%MAIL_DOMAIN
55 ISSUE_TRACKER_WEB = 'http://some.useful.url/'
56 ADMIN_EMAIL = 'roundup-admin@%s'%MAIL_DOMAIN
57 FILTER_POSITION = 'bottom' # one of 'top', 'bottom', 'top and bottom'
58 ANONYMOUS_ACCESS = 'deny' # either 'deny' or 'allow'
59 ANONYMOUS_REGISTER = 'deny' # either 'deny' or 'allow'
60 MESSAGES_TO_AUTHOR = 'no' # either 'yes' or 'no'
61 EMAIL_SIGNATURE_POSITION = 'bottom'
63 class anydbmDBTestCase(MyTestCase):
64 def setUp(self):
65 from roundup.backends import anydbm
66 # remove previous test, ignore errors
67 if os.path.exists(config.DATABASE):
68 shutil.rmtree(config.DATABASE)
69 os.makedirs(config.DATABASE + '/files')
70 self.db = anydbm.Database(config, 'test')
71 setupSchema(self.db, 1, anydbm)
72 self.db2 = anydbm.Database(config, 'test')
73 setupSchema(self.db2, 0, anydbm)
75 def testStringChange(self):
76 self.db.issue.create(title="spam", status='1')
77 self.assertEqual(self.db.issue.get('1', 'title'), 'spam')
78 self.db.issue.set('1', title='eggs')
79 self.assertEqual(self.db.issue.get('1', 'title'), 'eggs')
80 self.db.commit()
81 self.assertEqual(self.db.issue.get('1', 'title'), 'eggs')
82 self.db.issue.create(title="spam", status='1')
83 self.db.commit()
84 self.assertEqual(self.db.issue.get('2', 'title'), 'spam')
85 self.db.issue.set('2', title='ham')
86 self.assertEqual(self.db.issue.get('2', 'title'), 'ham')
87 self.db.commit()
88 self.assertEqual(self.db.issue.get('2', 'title'), 'ham')
90 def testLinkChange(self):
91 self.db.issue.create(title="spam", status='1')
92 self.assertEqual(self.db.issue.get('1', "status"), '1')
93 self.db.issue.set('1', status='2')
94 self.assertEqual(self.db.issue.get('1', "status"), '2')
96 def testDateChange(self):
97 self.db.issue.create(title="spam", status='1')
98 a = self.db.issue.get('1', "deadline")
99 self.db.issue.set('1', deadline=date.Date())
100 b = self.db.issue.get('1', "deadline")
101 self.db.commit()
102 self.assertNotEqual(a, b)
103 self.assertNotEqual(b, date.Date('1970-1-1 00:00:00'))
104 self.db.issue.set('1', deadline=date.Date())
106 def testIntervalChange(self):
107 self.db.issue.create(title="spam", status='1')
108 a = self.db.issue.get('1', "foo")
109 self.db.issue.set('1', foo=date.Interval('-1d'))
110 self.assertNotEqual(self.db.issue.get('1', "foo"), a)
112 def testNewProperty(self):
113 ' make sure a new property is added ok '
114 self.db.issue.create(title="spam", status='1')
115 self.db.issue.addprop(fixer=Link("user"))
116 props = self.db.issue.getprops()
117 keys = props.keys()
118 keys.sort()
119 self.assertEqual(keys, ['activity', 'creation', 'creator', 'deadline',
120 'files', 'fixer', 'foo', 'id', 'messages', 'nosy', 'status',
121 'superseder', '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',
255 'messages', 'nosy', 'status', 'superseder', '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, anydbm)
351 self.db = anydbm.Database(config)
352 setupSchema(self.db, 0, anydbm)
353 self.db2 = anydbm.Database(config, 'test')
354 setupSchema(self.db2, 0, anydbm)
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, bsddb)
376 self.db2 = bsddb.Database(config, 'test')
377 setupSchema(self.db2, 0, bsddb)
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, bsddb)
388 self.db = bsddb.Database(config)
389 setupSchema(self.db, 0, bsddb)
390 self.db2 = bsddb.Database(config, 'test')
391 setupSchema(self.db2, 0, bsddb)
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, bsddb3)
403 self.db2 = bsddb3.Database(config, 'test')
404 setupSchema(self.db2, 0, bsddb3)
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, bsddb3)
415 self.db = bsddb3.Database(config)
416 setupSchema(self.db, 0, bsddb3)
417 self.db2 = bsddb3.Database(config, 'test')
418 setupSchema(self.db2, 0, bsddb3)
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)
432 self.db2 = metakit.Database(config, 'test')
433 setupSchema(self.db2, 0, metakit)
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 class metakitReadOnlyDBTestCase(anydbmReadOnlyDBTestCase):
461 def setUp(self):
462 from roundup.backends import metakit
463 import weakref
464 metakit._instances = weakref.WeakValueDictionary()
465 # remove previous test, ignore errors
466 if os.path.exists(config.DATABASE):
467 shutil.rmtree(config.DATABASE)
468 os.makedirs(config.DATABASE + '/files')
469 db = metakit.Database(config, 'test')
470 setupSchema(db, 1, metakit)
471 self.db = metakit.Database(config)
472 setupSchema(self.db, 0, metakit)
473 self.db2 = metakit.Database(config, 'test')
474 setupSchema(self.db2, 0, metakit)
476 def suite():
477 l = [
478 unittest.makeSuite(anydbmDBTestCase, 'test'),
479 unittest.makeSuite(anydbmReadOnlyDBTestCase, 'test')
480 ]
482 try:
483 import bsddb
484 l.append(unittest.makeSuite(bsddbDBTestCase, 'test'))
485 l.append(unittest.makeSuite(bsddbReadOnlyDBTestCase, 'test'))
486 except:
487 print 'bsddb module not found, skipping bsddb DBTestCase'
489 try:
490 import bsddb3
491 l.append(unittest.makeSuite(bsddb3DBTestCase, 'test'))
492 l.append(unittest.makeSuite(bsddb3ReadOnlyDBTestCase, 'test'))
493 except:
494 print 'bsddb3 module not found, skipping bsddb3 DBTestCase'
496 try:
497 import metakit
498 l.append(unittest.makeSuite(metakitDBTestCase, 'test'))
499 l.append(unittest.makeSuite(metakitReadOnlyDBTestCase, 'test'))
500 except:
501 print 'metakit module not found, skipping metakit DBTestCase'
503 return unittest.TestSuite(l)
505 #
506 # $Log: not supported by cvs2svn $
507 # Revision 1.27 2002/07/14 02:05:54 richard
508 # . all storage-specific code (ie. backend) is now implemented by the backends
509 #
510 # Revision 1.26 2002/07/11 01:11:03 richard
511 # Added metakit backend to the db tests and fixed the more easily fixable test
512 # failures.
513 #
514 # Revision 1.25 2002/07/09 04:19:09 richard
515 # Added reindex command to roundup-admin.
516 # Fixed reindex on first access.
517 # Also fixed reindexing of entries that change.
518 #
519 # Revision 1.24 2002/07/09 03:02:53 richard
520 # More indexer work:
521 # - all String properties may now be indexed too. Currently there's a bit of
522 # "issue" specific code in the actual searching which needs to be
523 # addressed. In a nutshell:
524 # + pass 'indexme="yes"' as a String() property initialisation arg, eg:
525 # file = FileClass(db, "file", name=String(), type=String(),
526 # comment=String(indexme="yes"))
527 # + the comment will then be indexed and be searchable, with the results
528 # related back to the issue that the file is linked to
529 # - as a result of this work, the FileClass has a default MIME type that may
530 # be overridden in a subclass, or by the use of a "type" property as is
531 # done in the default templates.
532 # - the regeneration of the indexes (if necessary) is done once the schema is
533 # set up in the dbinit.
534 #
535 # Revision 1.23 2002/06/20 23:51:48 richard
536 # Cleaned up the hyperdb tests
537 #
538 # Revision 1.22 2002/05/21 05:52:11 richard
539 # Well whadya know, bsddb3 works again.
540 # The backend is implemented _exactly_ the same as bsddb - so there's no
541 # using its transaction or locking support. It'd be nice to use those some
542 # day I suppose.
543 #
544 # Revision 1.21 2002/04/15 23:25:15 richard
545 # . node ids are now generated from a lockable store - no more race conditions
546 #
547 # We're using the portalocker code by Jonathan Feinberg that was contributed
548 # to the ASPN Python cookbook. This gives us locking across Unix and Windows.
549 #
550 # Revision 1.20 2002/04/03 05:54:31 richard
551 # Fixed serialisation problem by moving the serialisation step out of the
552 # hyperdb.Class (get, set) into the hyperdb.Database.
553 #
554 # Also fixed htmltemplate after the showid changes I made yesterday.
555 #
556 # Unit tests for all of the above written.
557 #
558 # Revision 1.19 2002/02/25 14:34:31 grubert
559 # . use blobfiles in back_anydbm which is used in back_bsddb.
560 # change test_db as dirlist does not work for subdirectories.
561 # ATTENTION: blobfiles now creates subdirectories for files.
562 #
563 # Revision 1.18 2002/01/22 07:21:13 richard
564 # . fixed back_bsddb so it passed the journal tests
565 #
566 # ... it didn't seem happy using the back_anydbm _open method, which is odd.
567 # Yet another occurrance of whichdb not being able to recognise older bsddb
568 # databases. Yadda yadda. Made the HYPERDBDEBUG stuff more sane in the
569 # process.
570 #
571 # Revision 1.17 2002/01/22 05:06:09 rochecompaan
572 # We need to keep the last 'set' entry in the journal to preserve
573 # information on 'activity' for nodes.
574 #
575 # Revision 1.16 2002/01/21 16:33:20 rochecompaan
576 # You can now use the roundup-admin tool to pack the database
577 #
578 # Revision 1.15 2002/01/19 13:16:04 rochecompaan
579 # Journal entries for link and multilink properties can now be switched on
580 # or off.
581 #
582 # Revision 1.14 2002/01/16 07:02:57 richard
583 # . lots of date/interval related changes:
584 # - more relaxed date format for input
585 #
586 # Revision 1.13 2002/01/14 02:20:15 richard
587 # . changed all config accesses so they access either the instance or the
588 # config attriubute on the db. This means that all config is obtained from
589 # instance_config instead of the mish-mash of classes. This will make
590 # switching to a ConfigParser setup easier too, I hope.
591 #
592 # At a minimum, this makes migration a _little_ easier (a lot easier in the
593 # 0.5.0 switch, I hope!)
594 #
595 # Revision 1.12 2001/12/17 03:52:48 richard
596 # Implemented file store rollback. As a bonus, the hyperdb is now capable of
597 # storing more than one file per node - if a property name is supplied,
598 # the file is called designator.property.
599 # I decided not to migrate the existing files stored over to the new naming
600 # scheme - the FileClass just doesn't specify the property name.
601 #
602 # Revision 1.11 2001/12/10 23:17:20 richard
603 # Added transaction tests to test_db
604 #
605 # Revision 1.10 2001/12/03 21:33:39 richard
606 # Fixes so the tests use commit and not close
607 #
608 # Revision 1.9 2001/12/02 05:06:16 richard
609 # . We now use weakrefs in the Classes to keep the database reference, so
610 # the close() method on the database is no longer needed.
611 # I bumped the minimum python requirement up to 2.1 accordingly.
612 # . #487480 ] roundup-server
613 # . #487476 ] INSTALL.txt
614 #
615 # I also cleaned up the change message / post-edit stuff in the cgi client.
616 # There's now a clearly marked "TODO: append the change note" where I believe
617 # the change note should be added there. The "changes" list will obviously
618 # have to be modified to be a dict of the changes, or somesuch.
619 #
620 # More testing needed.
621 #
622 # Revision 1.8 2001/10/09 07:25:59 richard
623 # Added the Password property type. See "pydoc roundup.password" for
624 # implementation details. Have updated some of the documentation too.
625 #
626 # Revision 1.7 2001/08/29 06:23:59 richard
627 # Disabled the bsddb3 module entirely in the unit testing. See CHANGES for
628 # details.
629 #
630 # Revision 1.6 2001/08/07 00:24:43 richard
631 # stupid typo
632 #
633 # Revision 1.5 2001/08/07 00:15:51 richard
634 # Added the copyright/license notice to (nearly) all files at request of
635 # Bizar Software.
636 #
637 # Revision 1.4 2001/07/30 03:45:56 richard
638 # Added more DB to test_db. Can skip tests where imports fail.
639 #
640 # Revision 1.3 2001/07/29 07:01:39 richard
641 # Added vim command to all source so that we don't get no steenkin' tabs :)
642 #
643 # Revision 1.2 2001/07/29 04:09:20 richard
644 # Added the fabricated property "id" to all hyperdb classes.
645 #
646 # Revision 1.1 2001/07/27 06:55:07 richard
647 # moving tests -> test
648 #
649 # Revision 1.7 2001/07/27 06:26:43 richard
650 # oops - wasn't deleting the test dir after the read-only tests
651 #
652 # Revision 1.6 2001/07/27 06:23:59 richard
653 # consistency
654 #
655 # Revision 1.5 2001/07/27 06:23:09 richard
656 # Added some new hyperdb tests to make sure we raise the right exceptions.
657 #
658 # Revision 1.4 2001/07/25 04:34:31 richard
659 # Added id and log to tests files...
660 #
661 #
662 # vim: set filetype=python ts=4 sw=4 et si