@@ -124,7 +124,8 @@ def test_can_efficiently_get_follower_count_of_user(self):
124124 buzz = build ('buzz' , 'v1' )
125125
126126 # Restricting max_results to 1 means only a tiny amount of data comes back but the totalResults still has the total.
127- following = buzz .people ().list (userId = 'googlebuzz' , groupId = '@followers' , max_results = 1 ).execute ()
127+ following = buzz .people ().list (userId = 'googlebuzz' , groupId = '@followers' ,
128+ max_results = '1' ).execute ()
128129
129130 # @googlebuzz has a large but fluctuating number of followers
130131 # It is sufficient if the result is bigger than 10, 000
@@ -152,28 +153,32 @@ def test_can_create_activity(self):
152153 buzz = build ('buzz' , 'v1' , http = self .http )
153154
154155 activity = buzz .activities ().insert (userId = '@me' , body = {
155- 'title' : 'Testing insert' ,
156- 'object' : {
157- 'content' : u'Just a short note to show that insert is working. ?' ,
158- 'type' : 'note' }
159- }
156+ 'data' : {
157+ 'title' : 'Testing insert' ,
158+ 'object' : {
159+ 'content' : u'Just a short note to show that insert is working. ?' ,
160+ 'type' : 'note' }
161+ }
162+ }
160163 ).execute ()
161164 self .assertTrue (activity is not None )
162165
163166 def test_can_create_private_activity (self ):
164167 buzz = build ('buzz' , 'v1' , http = self .http )
165168
166169 activity = buzz .activities ().insert (userId = '@me' , body = {
167- 'title' : 'Testing insert' ,
168- 'object' : {
169- 'content' : 'This is a private post.'
170- },
171- 'visibility' : {
172- 'entries' : [
173- { 'id' : 'tag:google.com,2010:buzz-group:108242092577082601423:13' }
174- ]
175- }
176- }
170+ 'data' : {
171+ 'title' : 'Testing insert' ,
172+ 'object' : {
173+ 'content' : 'This is a private post.'
174+ },
175+ 'visibility' : {
176+ 'entries' : [
177+ { 'id' : 'tag:google.com,2010:buzz-group:108242092577082601423:13' }
178+ ]
179+ }
180+ }
181+ }
177182 ).execute ()
178183 self .assertTrue (activity is not None )
179184
@@ -201,11 +206,13 @@ def test_can_identify_number_of_groups_belonging_to_user(self):
201206 def IGNORE__test_can_like_activity (self ):
202207 buzz = build ('buzz' , 'v1' , http = self .http )
203208 activity = buzz .activities ().insert (userId = '@me' , body = {
204- 'title' : 'Testing insert' ,
205- 'object' : {
206- 'content' : u'Just a short note to show that insert is working. ?' ,
207- 'type' : 'note' }
208- }
209+ 'data' : {
210+ 'title' : 'Testing insert' ,
211+ 'object' : {
212+ 'content' : u'Just a short note to show that insert is working. ?' ,
213+ 'type' : 'note' }
214+ }
215+ }
209216 ).execute ()
210217 pprint .pprint (activity )
211218 id = activity ['id' ]
@@ -216,16 +223,20 @@ def test_can_comment_on_activity(self):
216223 buzz = build ('buzz' , 'v1' , http = self .http )
217224
218225 activity = buzz .activities ().insert (userId = '@me' , body = {
219- 'title' : 'A new activity' ,
220- 'object' : {
221- 'content' : u'The body of the new activity' ,
222- 'type' : 'note' }
223- }
226+ 'data' : {
227+ 'title' : 'A new activity' ,
228+ 'object' : {
229+ 'content' : u'The body of the new activity' ,
230+ 'type' : 'note' }
231+ }
232+ }
224233 ).execute ()
225234
226235 id = activity ['id' ]
227236 comment = buzz .comments ().insert (userId = '@me' , postId = id , body = {
228- "content" : "A comment on the new activity"
237+ 'data' : {
238+ 'content' : 'A comment on the new activity'
239+ }
229240 }).execute ()
230241
231242 def test_can_list_groups_belonging_to_user (self ):
@@ -248,11 +259,13 @@ def test_can_delete_activity(self):
248259 buzz = build ('buzz' , 'v1' , http = self .http )
249260
250261 activity = buzz .activities ().insert (userId = '@me' , body = {
251- 'title' : 'Activity to be deleted' ,
252- 'object' : {
253- 'content' : u'Created this activity so that it can be deleted.' ,
254- 'type' : 'note' }
255- }
262+ 'data' : {
263+ 'title' : 'Activity to be deleted' ,
264+ 'object' : {
265+ 'content' : u'Created this activity so that it can be deleted.' ,
266+ 'type' : 'note' }
267+ }
268+ }
256269 ).execute ()
257270 id = activity ['id' ]
258271
0 commit comments