@@ -1371,7 +1371,7 @@ def testLookupFriendship(self):
13711371
13721372 responses .add (
13731373 responses .GET ,
1374- 'https://api.twitter.com/1.1/friendships/lookup.json?user_id=12,13 ' ,
1374+ 'https://api.twitter.com/1.1/friendships/lookup.json?user_id=12,6385432 ' ,
13751375 body = resp_data ,
13761376 match_querystring = True ,
13771377 status = 200 )
@@ -1383,7 +1383,7 @@ def testLookupFriendship(self):
13831383 status = 200 )
13841384 responses .add (
13851385 responses .GET ,
1386- 'https://api.twitter.com/1.1/friendships/lookup.json?screen_name=jack,test ' ,
1386+ 'https://api.twitter.com/1.1/friendships/lookup.json?screen_name=jack,dickc ' ,
13871387 body = resp_data ,
13881388 match_querystring = True ,
13891389 status = 200 )
@@ -1397,7 +1397,7 @@ def testLookupFriendship(self):
13971397 # If any of the following produce an unexpect result, the test will
13981398 # fail on a request to a URL that hasn't been set by responses:
13991399 test_user = twitter .User (id = 12 , screen_name = 'jack' )
1400- test_user2 = twitter .User (id = 13 , screen_name = 'test ' )
1400+ test_user2 = twitter .User (id = 6385432 , screen_name = 'dickc ' )
14011401
14021402 resp = self .api .LookupFriendship (screen_name = 'jack' )
14031403 resp = self .api .LookupFriendship (screen_name = ['jack' ])
@@ -1412,3 +1412,30 @@ def testLookupFriendship(self):
14121412 self .assertRaises (
14131413 twitter .TwitterError ,
14141414 lambda : self .api .LookupFriendship ())
1415+
1416+ @responses .activate
1417+ def testLookupFriendshipMute (self ):
1418+ with open ('testdata/get_friendships_lookup_muting.json' ) as f :
1419+ resp_data = f .read ()
1420+ responses .add (
1421+ responses .GET ,
1422+ 'https://api.twitter.com/1.1/friendships/lookup.json?screen_name=dickc' ,
1423+ body = resp_data ,
1424+ match_querystring = True ,
1425+ status = 200 )
1426+ resp = self .api .LookupFriendship (screen_name = 'dickc' )
1427+ self .assertEqual (resp [0 ].muting , True )
1428+
1429+ @responses .activate
1430+ def testLookupFriendshipBlockMute (self ):
1431+ with open ('testdata/get_friendships_lookup_muting_blocking.json' ) as f :
1432+ resp_data = f .read ()
1433+ responses .add (
1434+ responses .GET ,
1435+ 'https://api.twitter.com/1.1/friendships/lookup.json?screen_name=dickc' ,
1436+ body = resp_data ,
1437+ match_querystring = True ,
1438+ status = 200 )
1439+ resp = self .api .LookupFriendship (screen_name = 'dickc' )
1440+ self .assertEqual (resp [0 ].muting , True )
1441+ self .assertEqual (resp [0 ].blocking , True )
0 commit comments