Skip to content

Commit 7a0d96b

Browse files
author
Richard Jones
committed
fixes from changes today
1 parent 3c4886f commit 7a0d96b

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

roundup/roundupdb.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: roundupdb.py,v 1.71 2002-10-08 04:11:13 richard Exp $
18+
# $Id: roundupdb.py,v 1.72 2002-10-08 07:28:34 richard Exp $
1919

2020
__doc__ = """
2121
Extending hyperdb with types specific to issue-tracking.
@@ -291,8 +291,7 @@ def email_signature(self, nodeid, msgid):
291291
# then append a trailing slash if it is missing
292292
base = self.db.config.TRACKER_WEB
293293
if (not isinstance(base , type('')) or
294-
not base.startswith('http://') or
295-
not base.startswith('https://')):
294+
not (base.startswith('http://') or base.startswith('https://'))):
296295
base = "Configuration Error: TRACKER_WEB isn't a " \
297296
"fully-qualified URL"
298297
elif base[-1] != '/' :

test/test_db.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: test_db.py,v 1.58 2002-10-03 06:56:30 richard Exp $
18+
# $Id: test_db.py,v 1.59 2002-10-08 07:28:34 richard Exp $
1919

2020
import unittest, os, shutil, time
2121

@@ -194,15 +194,15 @@ def testRetire(self):
194194
self.assertNotEqual(a, self.db.status.list())
195195

196196
def testSerialisation(self):
197-
self.db.issue.create(title="spam", status='1',
197+
nid = self.db.issue.create(title="spam", status='1',
198198
deadline=date.Date(), foo=date.Interval('-1d'))
199199
self.db.commit()
200-
assert isinstance(self.db.issue.get('1', 'deadline'), date.Date)
201-
assert isinstance(self.db.issue.get('1', 'foo'), date.Interval)
202-
self.db.user.create(username="fozzy",
200+
assert isinstance(self.db.issue.get(nid, 'deadline'), date.Date)
201+
assert isinstance(self.db.issue.get(nid, 'foo'), date.Interval)
202+
uid = self.db.user.create(username="fozzy",
203203
password=password.Password('t. bear'))
204204
self.db.commit()
205-
assert isinstance(self.db.user.get('1', 'password'), password.Password)
205+
assert isinstance(self.db.user.get(uid, 'password'), password.Password)
206206

207207
def testTransactions(self):
208208
# remember the number of items we started

0 commit comments

Comments
 (0)