Skip to content

Commit

Permalink
make tests compatible with Twisted 15.5.0 and 15.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
djmitche committed Dec 8, 2015
1 parent 8619018 commit 5ec6447
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions master/buildbot/test/unit/test_www_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def test_maybeAutoLogin_no_header(self):
try:
yield self.auth.maybeAutoLogin(self.request)
except Error as e:
self.assertEqual(e.status, 403)
self.assertEqual(str(e.status), '403')
else:
self.fail("403 expected")

Expand All @@ -128,7 +128,7 @@ def test_maybeAutoLogin_mismatched_value(self):
try:
yield self.auth.maybeAutoLogin(self.request)
except Error as e:
self.assertEqual(e.status, 403)
self.assertEqual(str(e.status), '403')
else:
self.fail("403 expected")

Expand Down
4 changes: 2 additions & 2 deletions master/buildbot/test/util/www.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ def assertRequest(self, content=None, contentJson=None, contentType=None,
got['contentType'] = self.request.headers['content-type']
exp['contentType'] = [contentType]
if responseCode is not None:
got['responseCode'] = self.request.responseCode
exp['responseCode'] = responseCode
got['responseCode'] = str(self.request.responseCode)
exp['responseCode'] = str(responseCode)
for header, value in iteritems(headers):
got[header] = self.request.headers.get(header)
exp[header] = value
Expand Down

0 comments on commit 5ec6447

Please sign in to comment.