blob: e82ec2486ab394ca22351e94999e59c990574b93 [file] [log] [blame]
ade@google.com46179d32010-08-21 00:00:03 +01001#!/usr/bin/python2.4
2#
3# Copyright 2010 Google Inc. All Rights Reserved.
4
5"""Discovery document tests
6
7Functional tests that verify we can retrieve data from existing services.
8
9These tests are read-only in order to ensure they're repeatable. They also
10only work with publicly visible data in order to avoid dealing with OAuth.
11"""
12
13__author__ = 'ade@google.com (Ade Oshineye)'
14
15from apiclient.discovery import build
16
17import logging
18import unittest
19
20logging.basicConfig(level=logging.DEBUG)
21
22
23class BuzzFunctionalTest(unittest.TestCase):
24 def test_can_get_buzz_activities_with_many_params(self):
25 buzz = build('buzz', 'v1')
26 max_results = 2
Joe Gregorioc5c5a372010-09-22 11:42:32 -040027 actcol = buzz.activities()
28 activities = actcol.list(userId='googlebuzz', scope='@self',
29 max_comments=max_results*2 ,max_liked=max_results*3,
30 max_results=max_results).execute()['items']
ade@google.com46179d32010-08-21 00:00:03 +010031 activity_count = len(activities)
32 self.assertEquals(max_results, activity_count)
Joe Gregorioc5c5a372010-09-22 11:42:32 -040033
34 activities = actcol.list_next(activities)
35 self.assertEquals(activities, None) # Public streams don't have next links