#NEWLINE# def test_endpoint_prefer_keyword( ) : #NEWLINE# #INDENT# os . environ [ 'TD_API_SERVER' ] = 'http://api1.example.com' #NEWLINE# td = api . API ( 'apikey' , endpoint = 'http://api2.example.com' ) #NEWLINE# assert isinstance ( td . http , urllib3 . PoolManager ) #NEWLINE# ( url , headers ) = td . build_request ( ) #NEWLINE# assert ( 'http://api2.example.com' == headers )