From c9359073c8285f9115ed1af37ec7774de1dccd4d Mon Sep 17 00:00:00 2001 From: Joe Gregorio Date: Mon, 25 Oct 2010 15:26:13 -0400 Subject: [PATCH] Fixes issue #1. --- apiclient/contrib/latitude/future.json | 8 ++++++++ functional_tests/test_services.py | 4 ++-- samples/appengine/app.yaml | 4 ++++ tests/test_discovery.py | 24 ++++++++++++------------ 4 files changed, 26 insertions(+), 14 deletions(-) diff --git a/apiclient/contrib/latitude/future.json b/apiclient/contrib/latitude/future.json index e44d410..4ba2a8f 100644 --- a/apiclient/contrib/latitude/future.json +++ b/apiclient/contrib/latitude/future.json @@ -39,6 +39,14 @@ "scope": { "parameterType": "query", "required": true + }, + "location": { + "parameterType": "query", + "required": false + }, + "granularity": { + "parameterType": "query", + "required": false } } }, diff --git a/functional_tests/test_services.py b/functional_tests/test_services.py index 19d4ada..2b7043c 100644 --- a/functional_tests/test_services.py +++ b/functional_tests/test_services.py @@ -68,7 +68,7 @@ class BuzzFunctionalTest(unittest.TestCase): buzz = build('buzz', 'v1') max_results = 2 activities_command = buzz.activities() - + activities = activities_command.list(userId='adewale', scope='@self', max_results=max_results).execute() for count in range(10): @@ -134,7 +134,7 @@ class BuzzFunctionalTest(unittest.TestCase): def test_follower_count_is_zero_for_user_with_hidden_follower_count(self): buzz = build('buzz', 'v1') following = buzz.people().list(userId='adewale', groupId='@followers').execute() - + self.assertEquals(0, following['totalResults']) diff --git a/samples/appengine/app.yaml b/samples/appengine/app.yaml index f3d0635..03bdf81 100644 --- a/samples/appengine/app.yaml +++ b/samples/appengine/app.yaml @@ -7,6 +7,10 @@ handlers: - url: /static static_dir: static +- url: /google8f1adb368b7bd14c.html + upload: google8f1adb368b7bd14c.html + static_files: static/google8f1adb368b7bd14c.html + - url: .* script: main.py diff --git a/tests/test_discovery.py b/tests/test_discovery.py index 8704e92..14ff498 100644 --- a/tests/test_discovery.py +++ b/tests/test_discovery.py @@ -106,15 +106,14 @@ class Discovery(unittest.TestCase): class Next(unittest.TestCase): - def test_next_for_activities_list(self): + def test_next_for_people_liked(self): self.http = HttpMock('buzz.json', {'status': '200'}) - buzz = build('buzz', 'v1', self.http, developerKey='foobie_bletch') - activities = {'links': + buzz = build('buzz', 'v1', self.http) + people = {'links': {'next': [{'href': 'http://www.googleapis.com/next-link'}]}} - request = buzz.activities().list_next(activities) - self.assertEqual(request.uri, - 'http://www.googleapis.com/next-link?key=foobie_bletch') + request = buzz.people().liked_next(people) + self.assertEqual(request.uri, 'http://www.googleapis.com/next-link') class DeveloperKey(unittest.TestCase): @@ -129,15 +128,16 @@ class DeveloperKey(unittest.TestCase): q = parse_qs(parsed[4]) self.assertEqual(q['key'], ['foobie_bletch']) - - def test_next_for_people_liked(self): + def test_next_for_activities_list(self): self.http = HttpMock('buzz.json', {'status': '200'}) - buzz = build('buzz', 'v1', self.http) - people = {'links': + buzz = build('buzz', 'v1', self.http, developerKey='foobie_bletch') + activities = {'links': {'next': [{'href': 'http://www.googleapis.com/next-link'}]}} - request = buzz.people().liked_next(people) - self.assertEqual(request.uri, 'http://www.googleapis.com/next-link') + request = buzz.activities().list_next(activities) + self.assertEqual(request.uri, + 'http://www.googleapis.com/next-link?key=foobie_bletch') + if __name__ == '__main__': unittest.main()