Mercurial > p > roundup > code
diff test/test_db.py @ 976:8c2036dace08
implemented multilink changes (and a unit test)
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 23 Aug 2002 05:33:32 +0000 |
| parents | 84216d63ed9c |
| children | 9b910e8d987d |
line wrap: on
line diff
--- a/test/test_db.py Fri Aug 23 05:00:38 2002 +0000 +++ b/test/test_db.py Fri Aug 23 05:33:32 2002 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: test_db.py,v 1.41 2002-08-23 04:58:00 richard Exp $ +# $Id: test_db.py,v 1.42 2002-08-23 05:33:32 richard Exp $ import unittest, os, shutil, time @@ -101,6 +101,16 @@ self.db.issue.set('1', status=None) self.assertEqual(self.db.issue.get('1', "status"), None) + def testMultilinkChange(self): + u1 = self.db.user.create(username='foo') + u2 = self.db.user.create(username='bar') + self.db.issue.create(title="spam", nosy=[u1]) + self.assertEqual(self.db.issue.get('1', "nosy"), [u1]) + self.db.issue.set('1', nosy=[]) + self.assertEqual(self.db.issue.get('1', "nosy"), []) + self.db.issue.set('1', nosy=[u1,u2]) + self.assertEqual(self.db.issue.get('1', "nosy"), [u1,u2]) + def testDateChange(self): self.db.issue.create(title="spam", status='1') a = self.db.issue.get('1', "deadline")
