# HG changeset patch # User Richard Jones # Date 1034062114 0 # Node ID fe67477e678f7ecafd489b97f4cbcd6c745a8ecd # Parent 209a47ede743652d65c36370cac9a33dba13f944 fixes from changes today diff -r 209a47ede743 -r fe67477e678f roundup/roundupdb.py --- 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] != '/' : diff -r 209a47ede743 -r fe67477e678f test/test_db.py --- 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