@@ -809,6 +809,7 @@ def testGetListMembers(self):
809
809
resp = self .api .GetListMembers (list_id = 93527328 )
810
810
self .assertTrue (type (resp [0 ]) is twitter .User )
811
811
self .assertEqual (resp [0 ].id , 4048395140 )
812
+ self .assertEqual (len (resp ), 47 )
812
813
813
814
@responses .activate
814
815
def testGetListMembersPaged (self ):
@@ -820,8 +821,10 @@ def testGetListMembersPaged(self):
820
821
body = resp_data ,
821
822
match_querystring = True ,
822
823
status = 200 )
823
- resp = self .api .GetListMembersPaged (list_id = 93527328 , cursor = 4611686020936348428 )
824
+ _ , _ , resp = self .api .GetListMembersPaged (list_id = 93527328 ,
825
+ cursor = 4611686020936348428 )
824
826
self .assertTrue ([isinstance (u , twitter .User ) for u in resp ])
827
+ self .assertEqual (len (resp ), 20 )
825
828
826
829
with open ('testdata/get_list_members_extra_params.json' ) as f :
827
830
resp_data = f .read ()
@@ -837,6 +840,7 @@ def testGetListMembersPaged(self):
837
840
include_entities = False ,
838
841
count = 100 )
839
842
self .assertFalse (resp [0 ].status )
843
+ self .assertEqual (len (resp ), 27 )
840
844
841
845
@responses .activate
842
846
def testGetListTimeline (self ):
@@ -1017,7 +1021,7 @@ def testGetSubscriptionsSN(self):
1017
1021
1018
1022
resp = self .api .GetSubscriptions (screen_name = 'inky' )
1019
1023
self .assertEqual (len (resp ), 20 )
1020
- self .assertTrue ([isinstance (l , twitter .List ) for l in resp ])
1024
+ self .assertTrue ([isinstance (lst , twitter .List ) for lst in resp ])
1021
1025
1022
1026
@responses .activate
1023
1027
def testGetMemberships (self ):
@@ -1289,7 +1293,7 @@ def testGetStatuses(self):
1289
1293
rsps .add (GET , DEFAULT_URL , body = resp_data )
1290
1294
1291
1295
with open ('testdata/get_statuses.ids.txt' ) as f :
1292
- status_ids = [int (l ) for l in f ]
1296
+ status_ids = [int (line ) for line in f ]
1293
1297
1294
1298
resp = self .api .GetStatuses (status_ids )
1295
1299
@@ -1312,7 +1316,7 @@ def testGetStatusesMap(self):
1312
1316
rsps .add (GET , DEFAULT_URL , body = resp_data )
1313
1317
1314
1318
with open ('testdata/get_statuses.ids.txt' ) as f :
1315
- status_ids = [int (l ) for l in f ]
1319
+ status_ids = [int (line ) for line in f ]
1316
1320
1317
1321
resp = self .api .GetStatuses (status_ids , map = True )
1318
1322
0 commit comments