#NEWLINE# def test_list_attachments( self ) : #NEWLINE# #INDENT# tenant = fakes . tenants [ 'baz' ] #NEWLINE# app = self . get_app ( ) #NEWLINE# for url in ( '/storagelink/' , '/storagelink' ) : #NEWLINE# #INDENT# req = self . _build_req ( url , tenant [ 'id' ] , method = 'GET' ) #NEWLINE# resp = req . get_response ( app ) #NEWLINE# self . assertEqual ( 200 , resp . status_code ) #NEWLINE# expected = [ ] #NEWLINE# for v in fakes . volumes [ tenant [ 'id' ] ] : #NEWLINE# #INDENT# for a in v [ 'attachments' ] : #NEWLINE# #INDENT# link_id = '_' . join ( [ a [ 'serverId' ] , v [ 'id' ] ] ) #NEWLINE# expected . append ( ( 'X-OCCI-Location' , utils . join_url ( ( self . application_url + '/' ) , ( 'storagelink/%s' % link_id ) ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# self . assertExpectedResult ( expected , resp )