Mercurial > p > roundup > code
comparison tests/test_db.py @ 71:5147b4c51fd5
Added the Roundup spec to the new documentation directory.
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 25 Jul 2001 01:23:07 +0000 |
| parents | b936635f142d |
| children | e1ce700bd7b9 |
comparison
equal
deleted
inserted
replaced
| 70:d95a03480fd1 | 71:5147b4c51fd5 |
|---|---|
| 33 self.db.issue.create(title="eggs", status='2') | 33 self.db.issue.create(title="eggs", status='2') |
| 34 self.db.issue.create(title="ham", status='4') | 34 self.db.issue.create(title="ham", status='4') |
| 35 self.db.issue.create(title="arguments", status='2') | 35 self.db.issue.create(title="arguments", status='2') |
| 36 self.db.issue.create(title="abuse", status='1') | 36 self.db.issue.create(title="abuse", status='1') |
| 37 self.db.issue.addprop(fixer=Link("user")) | 37 self.db.issue.addprop(fixer=Link("user")) |
| 38 self.db.issue.getprops() | 38 props = self.db.issue.getprops() |
| 39 #{"title": <hyperdb.String>, "status": <hyperdb.Link to "status">, | 39 keys = props.keys() |
| 40 #"user": <hyperdb.Link to "user">} | 40 keys.sort() |
| 41 self.assertEqual(keys, ['title', 'status', 'user'], 'wrong prop list') | |
| 41 self.db.issue.set('5', status=2) | 42 self.db.issue.set('5', status=2) |
| 42 self.db.issue.get('5', "status") | 43 self.db.issue.get('5', "status") |
| 43 self.db.status.get('2', "name") | 44 self.db.status.get('2', "name") |
| 44 self.db.issue.get('5', "title") | 45 self.db.issue.get('5', "title") |
| 45 self.db.issue.find(status = self.db.status.lookup("in-progress")) | 46 self.db.issue.find(status = self.db.status.lookup("in-progress")) |
| 46 self.db.issue.history('5') | 47 self.db.issue.history('5') |
| 47 self.db.status.history('1') | 48 self.db.status.history('1') |
| 48 self.db.status.history('2') | 49 self.db.status.history('2') |
| 49 | 50 |
| 51 def testExceptions(self): | |
| 52 # this tests the exceptions that should be raised | |
| 50 | 53 |
| 51 def suite(): | 54 def suite(): |
| 52 return unittest.makeSuite(DBTestCase, 'test') | 55 return unittest.makeSuite(DBTestCase, 'test') |
| 53 | 56 |
