#NEWLINE# def test_account_tokens( self , multiple_login = False ) : #NEWLINE# #INDENT# if multiple_login : #NEWLINE# #INDENT# self . patches [ 'requests' ] . get . side_effect = [ MockedResponse ( 200 , self . response_data ) , MockedResponse ( 200 , self . email_response_data ) , MockedResponse ( 200 , self . response_data ) , MockedResponse ( 200 , self . email_response_data ) ] #NEWLINE# #UNINDENT# super ( BitbucketOAuth2Tests , self ) . test_account_tokens ( multiple_login ) #NEWLINE# calls = [ mock . call ( 'https://api.bitbucket.org/2.0/user' , params = mock . ANY ) , mock . call ( 'https://api.bitbucket.org/2.0/user/emails' , params = mock . ANY ) ] #NEWLINE# if multiple_login : #NEWLINE# #INDENT# calls . extend ( [ mock . call ( 'https://api.bitbucket.org/2.0/user' , params = mock . ANY ) , mock . call ( 'https://api.bitbucket.org/2.0/user/emails' , params = mock . ANY ) ] ) #NEWLINE# #UNINDENT# self . patches [ 'requests' ] . get . assert_has_calls ( calls )