#NEWLINE# @ mock . patch ( 'urllib3.connection.HTTPSConnection' ) #NEWLINE# def test_create_connection_https_with_ssl_thumbprint( self , https_conn ) : #NEWLINE# #INDENT# conn = mock . Mock ( ) #NEWLINE# https_conn . return_value = conn #NEWLINE# handle = rw_handles . FileHandle ( None ) #NEWLINE# cacerts = mock . sentinel . cacerts #NEWLINE# thumbprint = mock . sentinel . thumbprint #NEWLINE# ret = handle . _create_connection ( 'https://localhost/foo?q=bar' , 'GET' , cacerts = ret , ssl_thumbprint = thumbprint ) #NEWLINE# self . assertEqual ( conn , ret ) #NEWLINE# conn . set_cert . assert_called_once_with ( ca_certs = cacerts , cert_reqs = None , assert_fingerprint = thumbprint )