|
15 | 15 | # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
16 | 16 | # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
17 | 17 | # |
18 | | -# $Id: test_db.py,v 1.58 2002-10-03 06:56:30 richard Exp $ |
| 18 | +# $Id: test_db.py,v 1.59 2002-10-08 07:28:34 richard Exp $ |
19 | 19 |
|
20 | 20 | import unittest, os, shutil, time |
21 | 21 |
|
@@ -194,15 +194,15 @@ def testRetire(self): |
194 | 194 | self.assertNotEqual(a, self.db.status.list()) |
195 | 195 |
|
196 | 196 | def testSerialisation(self): |
197 | | - self.db.issue.create(title="spam", status='1', |
| 197 | + nid = self.db.issue.create(title="spam", status='1', |
198 | 198 | deadline=date.Date(), foo=date.Interval('-1d')) |
199 | 199 | self.db.commit() |
200 | | - assert isinstance(self.db.issue.get('1', 'deadline'), date.Date) |
201 | | - assert isinstance(self.db.issue.get('1', 'foo'), date.Interval) |
202 | | - self.db.user.create(username="fozzy", |
| 200 | + assert isinstance(self.db.issue.get(nid, 'deadline'), date.Date) |
| 201 | + assert isinstance(self.db.issue.get(nid, 'foo'), date.Interval) |
| 202 | + uid = self.db.user.create(username="fozzy", |
203 | 203 | password=password.Password('t. bear')) |
204 | 204 | self.db.commit() |
205 | | - assert isinstance(self.db.user.get('1', 'password'), password.Password) |
| 205 | + assert isinstance(self.db.user.get(uid, 'password'), password.Password) |
206 | 206 |
|
207 | 207 | def testTransactions(self): |
208 | 208 | # remember the number of items we started |
|
0 commit comments