Mercurial > p > roundup > code
changeset 1253:fe67477e678f
fixes from changes today
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 08 Oct 2002 07:28:34 +0000 |
| parents | 209a47ede743 |
| children | 77920c42aeb9 |
| files | roundup/roundupdb.py test/test_db.py |
| diffstat | 2 files changed, 8 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/roundup/roundupdb.py Tue Oct 08 04:11:17 2002 +0000 +++ b/roundup/roundupdb.py Tue Oct 08 07:28:34 2002 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: roundupdb.py,v 1.71 2002-10-08 04:11:13 richard Exp $ +# $Id: roundupdb.py,v 1.72 2002-10-08 07:28:34 richard Exp $ __doc__ = """ Extending hyperdb with types specific to issue-tracking. @@ -291,8 +291,7 @@ # then append a trailing slash if it is missing base = self.db.config.TRACKER_WEB if (not isinstance(base , type('')) or - not base.startswith('http://') or - not base.startswith('https://')): + not (base.startswith('http://') or base.startswith('https://'))): base = "Configuration Error: TRACKER_WEB isn't a " \ "fully-qualified URL" elif base[-1] != '/' :
--- a/test/test_db.py Tue Oct 08 04:11:17 2002 +0000 +++ b/test/test_db.py Tue Oct 08 07:28:34 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.58 2002-10-03 06:56:30 richard Exp $ +# $Id: test_db.py,v 1.59 2002-10-08 07:28:34 richard Exp $ import unittest, os, shutil, time @@ -194,15 +194,15 @@ self.assertNotEqual(a, self.db.status.list()) def testSerialisation(self): - self.db.issue.create(title="spam", status='1', + nid = self.db.issue.create(title="spam", status='1', deadline=date.Date(), foo=date.Interval('-1d')) self.db.commit() - assert isinstance(self.db.issue.get('1', 'deadline'), date.Date) - assert isinstance(self.db.issue.get('1', 'foo'), date.Interval) - self.db.user.create(username="fozzy", + assert isinstance(self.db.issue.get(nid, 'deadline'), date.Date) + assert isinstance(self.db.issue.get(nid, 'foo'), date.Interval) + uid = self.db.user.create(username="fozzy", password=password.Password('t. bear')) self.db.commit() - assert isinstance(self.db.user.get('1', 'password'), password.Password) + assert isinstance(self.db.user.get(uid, 'password'), password.Password) def testTransactions(self): # remember the number of items we started
