Fixes issue #1.

This commit is contained in:
Joe Gregorio
2010-10-25 15:26:13 -04:00
parent 582a99a920
commit c9359073c8
4 changed files with 26 additions and 14 deletions

View File

@@ -39,6 +39,14 @@
"scope": {
"parameterType": "query",
"required": true
},
"location": {
"parameterType": "query",
"required": false
},
"granularity": {
"parameterType": "query",
"required": false
}
}
},

View File

@@ -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'])

View File

@@ -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

View File

@@ -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()