Fix details missing in googleapiclient.errors.HttpError (#412)
Resolves: #382
diff --git a/tests/test_errors.py b/tests/test_errors.py
index 8a58030..e4d2f09 100644
--- a/tests/test_errors.py
+++ b/tests/test_errors.py
@@ -41,7 +41,8 @@
}
],
"code": 400,
- "message": "country is required"
+ "message": "country is required",
+ "details": "error details"
}
}
"""
@@ -61,7 +62,7 @@
{'status':'400', 'content-type': 'application/json'},
reason='Failed')
error = HttpError(resp, content, uri='http://example.org')
- self.assertEqual(str(error), '<HttpError 400 when requesting http://example.org returned "country is required">')
+ self.assertEqual(str(error), '<HttpError 400 when requesting http://example.org returned "country is required". Details: "error details">')
def test_bad_json_body(self):
"""Test handling of bodies with invalid json."""