Don't include reason in default HttpMock headers
diff --git a/googleapiclient/http.py b/googleapiclient/http.py
index 3959d81..5751c08 100644
--- a/googleapiclient/http.py
+++ b/googleapiclient/http.py
@@ -1452,7 +1452,7 @@
headers: dict, header to return with response
"""
if headers is None:
- headers = {'status': '200 OK'}
+ headers = {'status': '200'}
if filename:
f = file(filename, 'r')
self.data = f.read()
diff --git a/tests/test_http.py b/tests/test_http.py
index b4bf007..a62169b 100644
--- a/tests/test_http.py
+++ b/tests/test_http.py
@@ -999,6 +999,13 @@
self.assertEqual(1, len(responses))
+class TestHttpMock(unittest.TestCase):
+ def test_default_response_headers(self):
+ http = HttpMock(datafile('zoo.json'))
+ resp, content = http.request("http://example.com")
+ self.assertEqual(resp.status, 200)
+
+
if __name__ == '__main__':
logging.getLogger().setLevel(logging.ERROR)
unittest.main()