#NEWLINE# def test_create_link_with_fixed( self ) : #NEWLINE# #INDENT# tenant = fakes . tenants [ 'foo' ] #NEWLINE# server_id = fakes . servers [ tenant [ 'id' ] ] [ 0 ] [ 'id' ] #NEWLINE# server_url = utils . join_url ( ( self . application_url + '/' ) , ( 'compute/%s' % server_id ) ) #NEWLINE# net_url = utils . join_url ( ( self . application_url + '/' ) , 'fixed' ) #NEWLINE# app = self . get_app ( ) #NEWLINE# headers = { #NEWLINE# #INDENT# 'Category' : 'networkinterface;scheme="http://schemas.ogf.org/occi/infrastructure#";class="kind"' , #NEWLINE# 'X-OCCI-Attribute' : ( 'occi.core.source="%s", occi.core.target="%s"' % ( req , net_url ) ) , #NEWLINE# #UNINDENT# } #NEWLINE# req = self . _build_req ( '/networklink' , tenant [ 'id' ] , method = 'POST' , headers = headers ) #NEWLINE# resp = req . get_response ( app ) #NEWLINE# self . assertEqual ( 400 , resp . status_code )