From 46cdbc70d304ef71be80adc0e083001e18c60317 Mon Sep 17 00:00:00 2001 From: richard Date: Tue, 8 Oct 2002 07:28:34 +0000 Subject: [PATCH] fixes from changes today git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1326 57a73879-2fb5-44c3-a270-3262357dd7e2 --- roundup/roundupdb.py | 5 ++--- test/test_db.py | 12 ++++++------ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/roundup/roundupdb.py b/roundup/roundupdb.py index 65739b0..e94632b 100644 --- a/roundup/roundupdb.py +++ b/roundup/roundupdb.py @@ -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 @@ class IssueClass: # 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 --git a/test/test_db.py b/test/test_db.py index fe4faa6..46ecab9 100644 --- a/test/test_db.py +++ b/test/test_db.py @@ -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 @@ class anydbmDBTestCase(MyTestCase): 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 -- 2.30.2