Fix some other tests broken by the new HttpError implementation
This commit is contained in:
@@ -43,7 +43,6 @@ class HttpError(Error):
|
||||
return '<HttpError %s "%s">' % (self.resp.status, self._get_reason())
|
||||
|
||||
__str__ = __repr__
|
||||
|
||||
|
||||
|
||||
class UnknownLinkType(Error):
|
||||
|
||||
@@ -114,7 +114,7 @@ class Model(unittest.TestCase):
|
||||
model = JsonModel()
|
||||
resp = httplib2.Response({'status': '401'})
|
||||
resp.reason = 'Unauthorized'
|
||||
content = '{"error": "not authorized"}'
|
||||
content = '{"error": {"message": "not authorized"}}'
|
||||
|
||||
try:
|
||||
content = model.response(resp, content)
|
||||
|
||||
@@ -61,7 +61,7 @@ class Mocks(unittest.TestCase):
|
||||
activity = buzz.activities().list(scope='@self', userId='@me').execute()
|
||||
self.fail('An exception should have been thrown')
|
||||
except HttpError, e:
|
||||
self.assertEqual('500 Server Error', e.detail)
|
||||
self.assertEqual('{}', e.content)
|
||||
self.assertEqual(500, e.resp.status)
|
||||
self.assertEqual('Server Error', e.resp.reason)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user