#NEWLINE# def test_add_node_id( self , mock_upd ) : #NEWLINE# #INDENT# response = self . patch_json ( ( '/ports/%s' % self . port . uuid ) , [ { #NEWLINE# #INDENT# 'path' : '/node_id' , #NEWLINE# 'value' : '1' , #NEWLINE# 'op' : 'add' , #NEWLINE# #UNINDENT# } ] , expect_errors = True ) #NEWLINE# self . assertEqual ( 'application/json' , response . content_type ) #NEWLINE# self . assertEqual ( http_client . BAD_REQUEST , response . status_code ) #NEWLINE# self . assertFalse ( mock_upd . called )