Fixes issue #1.
This commit is contained in:
@@ -39,6 +39,14 @@
|
|||||||
"scope": {
|
"scope": {
|
||||||
"parameterType": "query",
|
"parameterType": "query",
|
||||||
"required": true
|
"required": true
|
||||||
|
},
|
||||||
|
"location": {
|
||||||
|
"parameterType": "query",
|
||||||
|
"required": false
|
||||||
|
},
|
||||||
|
"granularity": {
|
||||||
|
"parameterType": "query",
|
||||||
|
"required": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ class BuzzFunctionalTest(unittest.TestCase):
|
|||||||
buzz = build('buzz', 'v1')
|
buzz = build('buzz', 'v1')
|
||||||
max_results = 2
|
max_results = 2
|
||||||
activities_command = buzz.activities()
|
activities_command = buzz.activities()
|
||||||
|
|
||||||
activities = activities_command.list(userId='adewale', scope='@self',
|
activities = activities_command.list(userId='adewale', scope='@self',
|
||||||
max_results=max_results).execute()
|
max_results=max_results).execute()
|
||||||
for count in range(10):
|
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):
|
def test_follower_count_is_zero_for_user_with_hidden_follower_count(self):
|
||||||
buzz = build('buzz', 'v1')
|
buzz = build('buzz', 'v1')
|
||||||
following = buzz.people().list(userId='adewale', groupId='@followers').execute()
|
following = buzz.people().list(userId='adewale', groupId='@followers').execute()
|
||||||
|
|
||||||
self.assertEquals(0, following['totalResults'])
|
self.assertEquals(0, following['totalResults'])
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,10 @@ handlers:
|
|||||||
- url: /static
|
- url: /static
|
||||||
static_dir: static
|
static_dir: static
|
||||||
|
|
||||||
|
- url: /google8f1adb368b7bd14c.html
|
||||||
|
upload: google8f1adb368b7bd14c.html
|
||||||
|
static_files: static/google8f1adb368b7bd14c.html
|
||||||
|
|
||||||
- url: .*
|
- url: .*
|
||||||
script: main.py
|
script: main.py
|
||||||
|
|
||||||
|
|||||||
@@ -106,15 +106,14 @@ class Discovery(unittest.TestCase):
|
|||||||
|
|
||||||
|
|
||||||
class Next(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'})
|
self.http = HttpMock('buzz.json', {'status': '200'})
|
||||||
buzz = build('buzz', 'v1', self.http, developerKey='foobie_bletch')
|
buzz = build('buzz', 'v1', self.http)
|
||||||
activities = {'links':
|
people = {'links':
|
||||||
{'next':
|
{'next':
|
||||||
[{'href': 'http://www.googleapis.com/next-link'}]}}
|
[{'href': 'http://www.googleapis.com/next-link'}]}}
|
||||||
request = buzz.activities().list_next(activities)
|
request = buzz.people().liked_next(people)
|
||||||
self.assertEqual(request.uri,
|
self.assertEqual(request.uri, 'http://www.googleapis.com/next-link')
|
||||||
'http://www.googleapis.com/next-link?key=foobie_bletch')
|
|
||||||
|
|
||||||
|
|
||||||
class DeveloperKey(unittest.TestCase):
|
class DeveloperKey(unittest.TestCase):
|
||||||
@@ -129,15 +128,16 @@ class DeveloperKey(unittest.TestCase):
|
|||||||
q = parse_qs(parsed[4])
|
q = parse_qs(parsed[4])
|
||||||
self.assertEqual(q['key'], ['foobie_bletch'])
|
self.assertEqual(q['key'], ['foobie_bletch'])
|
||||||
|
|
||||||
|
def test_next_for_activities_list(self):
|
||||||
def test_next_for_people_liked(self):
|
|
||||||
self.http = HttpMock('buzz.json', {'status': '200'})
|
self.http = HttpMock('buzz.json', {'status': '200'})
|
||||||
buzz = build('buzz', 'v1', self.http)
|
buzz = build('buzz', 'v1', self.http, developerKey='foobie_bletch')
|
||||||
people = {'links':
|
activities = {'links':
|
||||||
{'next':
|
{'next':
|
||||||
[{'href': 'http://www.googleapis.com/next-link'}]}}
|
[{'href': 'http://www.googleapis.com/next-link'}]}}
|
||||||
request = buzz.people().liked_next(people)
|
request = buzz.activities().list_next(activities)
|
||||||
self.assertEqual(request.uri, 'http://www.googleapis.com/next-link')
|
self.assertEqual(request.uri,
|
||||||
|
'http://www.googleapis.com/next-link?key=foobie_bletch')
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|||||||
Reference in New Issue
Block a user