comparison test/test_db.py @ 121:3672eb16a274

Added the fabricated property "id" to all hyperdb classes.
author Richard Jones <richard@users.sourceforge.net>
date Sun, 29 Jul 2001 04:09:20 +0000
parents fa44da8d9df2
children 0791d13baea7
comparison
equal deleted inserted replaced
120:e8087fc26fee 121:3672eb16a274
1 # $Id: test_db.py,v 1.1 2001-07-27 06:55:07 richard Exp $ 1 # $Id: test_db.py,v 1.2 2001-07-29 04:09:20 richard Exp $
2 2
3 import unittest, os, shutil 3 import unittest, os, shutil
4 4
5 from roundup.backends import anydbm 5 from roundup.backends import anydbm
6 from roundup.hyperdb import String, Link, Multilink, Date, Interval, Class, \ 6 from roundup.hyperdb import String, Link, Multilink, Date, Interval, Class, \
41 self.db.issue.create(title="abuse", status='1') 41 self.db.issue.create(title="abuse", status='1')
42 self.db.issue.addprop(fixer=Link("user")) 42 self.db.issue.addprop(fixer=Link("user"))
43 props = self.db.issue.getprops() 43 props = self.db.issue.getprops()
44 keys = props.keys() 44 keys = props.keys()
45 keys.sort() 45 keys.sort()
46 self.assertEqual(keys, ['fixer', 'nosy', 'status', 'title']) 46 self.assertEqual(keys, ['fixer', 'id', 'nosy', 'status', 'title'])
47 self.db.issue.set('5', status='2') 47 self.db.issue.set('5', status='2')
48 self.db.issue.get('5', "status") 48 self.db.issue.get('5', "status")
49 self.db.status.get('2', "name") 49 self.db.status.get('2', "name")
50 self.db.issue.get('5', "title") 50 self.db.issue.get('5', "title")
51 self.db.issue.find(status = self.db.status.lookup("in-progress")) 51 self.db.issue.find(status = self.db.status.lookup("in-progress"))
155 return unittest.TestSuite((db, readonlydb)) 155 return unittest.TestSuite((db, readonlydb))
156 156
157 157
158 # 158 #
159 # $Log: not supported by cvs2svn $ 159 # $Log: not supported by cvs2svn $
160 # Revision 1.1 2001/07/27 06:55:07 richard
161 # moving tests -> test
162 #
160 # Revision 1.7 2001/07/27 06:26:43 richard 163 # Revision 1.7 2001/07/27 06:26:43 richard
161 # oops - wasn't deleting the test dir after the read-only tests 164 # oops - wasn't deleting the test dir after the read-only tests
162 # 165 #
163 # Revision 1.6 2001/07/27 06:23:59 richard 166 # Revision 1.6 2001/07/27 06:23:59 richard
164 # consistency 167 # consistency

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