#NEWLINE# @ mock . patch . object ( glance . GlanceClientWrapper , '__init__' , return_value = None ) #NEWLINE# def test_get_remote_service_from_href( self , gcwi_mocked ) : #NEWLINE# #INDENT# id_or_uri = 'http://127.0.0.1/v1/images/123' #NEWLINE# ( _ignored , image_id ) = glance . get_remote_image_service ( mock . sentinel . ctx , id_or_uri ) #NEWLINE# self . assertEqual ( '123' , image_id ) #NEWLINE# gcwi_mocked . assert_called_once_with ( context = mock . sentinel . ctx , endpoint = 'http://127.0.0.1' )