comparison test/test_db.py @ 570:e346a9792335

fixed back_bsddb so it passed the journal tests ... it didn't seem happy using the back_anydbm _open method, which is odd. Yet another occurrance of whichdb not being able to recognise older bsddb databases. Yadda yadda. Made the HYPERDBDEBUG stuff more sane in the process.
author Richard Jones <richard@users.sourceforge.net>
date Tue, 22 Jan 2002 07:21:13 +0000
parents 73af3e54c309
children 07abfe8f0c01
comparison
equal deleted inserted replaced
569:d426d44abd3c 570:e346a9792335
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_db.py,v 1.17 2002-01-22 05:06:09 rochecompaan Exp $ 18 # $Id: test_db.py,v 1.18 2002-01-22 07:21:13 richard Exp $
19 19
20 import unittest, os, shutil 20 import unittest, os, shutil
21 21
22 from roundup.hyperdb import String, Password, Link, Multilink, Date, \ 22 from roundup.hyperdb import String, Password, Link, Multilink, Date, \
23 Interval, Class, DatabaseError 23 Interval, Class, DatabaseError
244 self.db.commit() 244 self.db.commit()
245 self.db.issue.set('1', status='2') 245 self.db.issue.set('1', status='2')
246 self.db.commit() 246 self.db.commit()
247 self.db.issue.set('1', status='3') 247 self.db.issue.set('1', status='3')
248 self.db.commit() 248 self.db.commit()
249
250 pack_before = date.Date(". + 1d") 249 pack_before = date.Date(". + 1d")
251 self.db.pack(pack_before) 250 self.db.pack(pack_before)
252 journal = self.db.getjournal('issue', '1') 251 journal = self.db.getjournal('issue', '1')
253 self.assertEqual(2, len(journal)) 252 self.assertEqual(2, len(journal))
254 253
345 344
346 return unittest.TestSuite(l) 345 return unittest.TestSuite(l)
347 346
348 # 347 #
349 # $Log: not supported by cvs2svn $ 348 # $Log: not supported by cvs2svn $
349 # Revision 1.17 2002/01/22 05:06:09 rochecompaan
350 # We need to keep the last 'set' entry in the journal to preserve
351 # information on 'activity' for nodes.
352 #
350 # Revision 1.16 2002/01/21 16:33:20 rochecompaan 353 # Revision 1.16 2002/01/21 16:33:20 rochecompaan
351 # You can now use the roundup-admin tool to pack the database 354 # You can now use the roundup-admin tool to pack the database
352 # 355 #
353 # Revision 1.15 2002/01/19 13:16:04 rochecompaan 356 # Revision 1.15 2002/01/19 13:16:04 rochecompaan
354 # Journal entries for link and multilink properties can now be switched on 357 # Journal entries for link and multilink properties can now be switched on

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