Force pretty-printing to always be on. This is a temporary measure to 1-aid debugging and 2-find out what impact this has on real-world usage.
This commit is contained in:
@@ -96,6 +96,7 @@ class JsonModel(object):
|
||||
|
||||
def build_query(self, params):
|
||||
params.update({'alt': 'json'})
|
||||
params.update({'pp': '1'})
|
||||
astuples = []
|
||||
for key, value in params.iteritems():
|
||||
if getattr(value, 'encode', False) and callable(value.encode):
|
||||
@@ -115,7 +116,7 @@ class JsonModel(object):
|
||||
body = body['data']
|
||||
return body
|
||||
else:
|
||||
logging.debug('Content from bad request was: %s' % content)
|
||||
logging.error('Content from bad request was: %s' % content)
|
||||
if resp.get('content-type', '').startswith('application/json'):
|
||||
raise HttpError(resp, simplejson.loads(content)['error'])
|
||||
else:
|
||||
|
||||
@@ -83,7 +83,8 @@ class BuzzFunctionalTest(unittest.TestCase):
|
||||
buzz = build('buzz', 'v1', self.http)
|
||||
max_results = 1
|
||||
people_cmd = buzz.people()
|
||||
#https://www.googleapis.com/buzz/v1/activities/111062888259659218284/@self/B:z13nh535yk2syfob004cdjyb3mjeulcwv3c?alt=json#
|
||||
# The post https://www.googleapis.com/buzz/v1/activities/111062888259659218284/@self/B:z13nh535yk2syfob004cdjyb3mjeulcwv3c?alt=json#
|
||||
#Perform this call https://www.googleapis.com/buzz/v1/activities/111062888259659218284/@self/B:z13nh535yk2syfob004cdjyb3mjeulcwv3c/@liked?alt=json&max-results=1
|
||||
people = people_cmd.liked(groupId='@liked', userId='googlebuzz', scope='@self',
|
||||
postId='B:z13nh535yk2syfob004cdjyb3mjeulcwv3c', max_results=max_results).execute()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user