#NEWLINE# def test_get_custom_fields_invalid_fields( self ) : #NEWLINE# #INDENT# port = obj_utils . create_test_port ( self . context , node_id = self . node . id ) #NEWLINE# fields = 'uuid,spongebob' #NEWLINE# response = self . get_json ( ( '/ports/%s?fields=%s' % ( port . uuid , fields ) ) , headers = { #NEWLINE# #INDENT# api_base . Version . string : str ( api_v1 . MAX_VER ) , #NEWLINE# #UNINDENT# } , expect_errors = True ) #NEWLINE# self . assertEqual ( http_client . BAD_REQUEST , response . status_int ) #NEWLINE# self . assertEqual ( 'application/json' , response . content_type ) #NEWLINE# self . assertIn ( 'spongebob' , response . json [ 'error_message' ] )