#NEWLINE# def test_parsing_auth_v2( self ) : #NEWLINE# #INDENT# data = self . fixtures . load ( '_v2_0__auth.json' ) #NEWLINE# data = json . loads ( data ) #NEWLINE# service_catalog = data [ 'access' ] [ 'serviceCatalog' ] #NEWLINE# catalog = OpenStackServiceCatalog ( service_catalog = service_catalog , auth_version = '2.0' ) #NEWLINE# entries = catalog . get_entries ( ) #NEWLINE# self . assertEqual ( len ( entries ) , 6 ) #NEWLINE# entry = [ e for e in entries if ( e . service_name == 'cloudServers' ) ] [ 0 ] #NEWLINE# self . assertEqual ( entry . service_type , 'compute' ) #NEWLINE# self . assertEqual ( entry . service_name , 'cloudServers' ) #NEWLINE# self . assertEqual ( len ( entry . endpoints ) , 1 ) #NEWLINE# self . assertEqual ( entry . endpoints [ 0 ] . region , None ) #NEWLINE# self . assertEqual ( entry . endpoints [ 0 ] . url , 'https://servers.api.rackspacecloud.com/v1.0/1337' ) #NEWLINE# self . assertEqual ( entry . endpoints [ 0 ] . endpoint_type , 'external' )