Enhanced HttpError to now include the original request URI if possible.
diff --git a/tests/test_discovery.py b/tests/test_discovery.py
index e89fe9f..ecb59f9 100644
--- a/tests/test_discovery.py
+++ b/tests/test_discovery.py
@@ -35,6 +35,7 @@
from apiclient.discovery import build, key2param
from apiclient.http import HttpMock
from apiclient.errors import HttpError
+from apiclient.errors import InvalidJsonError
DATA_DIR = os.path.join(os.path.dirname(__file__), 'data')
@@ -56,8 +57,8 @@
try:
buzz = build('buzz', 'v1', self.http)
self.fail("should have raised an exception over malformed JSON.")
- except HttpError, e:
- self.assertEqual(e.content, "{\n")
+ except InvalidJsonError:
+ pass
class Discovery(unittest.TestCase):