More robust picking up JSON error responses.
Fixes issue #169.
Another CL towards fixing 169, by making sure we parse the JSON error response
in more cases.
Reviewed in http://codereview.appspot.com/6447045/.
diff --git a/tests/test_json_model.py b/tests/test_json_model.py
index 43b0421..ececdab 100644
--- a/tests/test_json_model.py
+++ b/tests/test_json_model.py
@@ -147,7 +147,7 @@
content = model.response(resp, content)
self.fail('Should have thrown an exception')
except HttpError, e:
- self.assertTrue('Unauthorized' in str(e))
+ self.assertTrue('not authorized' in str(e))
resp['content-type'] = 'application/json'