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