#NEWLINE# @ httpretty . activate #NEWLINE# def test_valid_credentials_and_code( self ) : #NEWLINE# #INDENT# 'Verify no error is raised when API calls return status code 200.' #NEWLINE# httpretty . register_uri ( httpretty . POST , 'https://clef.io/api/v1/authorize' , body = '{"success": "true", "access_token": "fake_token"}' , content_type = 'text/json' , status = 200 ) #NEWLINE# httpretty . register_uri ( httpretty . GET , 'https://clef.io/api/v1/info' , body = json . dumps ( user_info . good_info_response ) , content_type = 'text/json' , status = 200 ) #NEWLINE# user_info = self . api . get_login_information ( code = self . code ) #NEWLINE# self . assertEqual ( user_info [ 'first_name' ] , 'Alex' ) #NEWLINE# self . assertEqual ( user_info [ 'id' ] , '12345' ) #NEWLINE# self . assertEqual ( user_info [ 'email' ] , 'alex@getclef.com' )