#NEWLINE# @ mock . patch . object ( api_utils , 'get_rpc_node' ) #NEWLINE# def test_detail_by_node_name_not_supported( self , mock_get_rpc_node ) : #NEWLINE# #INDENT# mock_get_rpc_node . side_effect = exception . InvalidUuidOrName ( name = self . node . uuid ) #NEWLINE# obj_utils . create_test_port ( self . context , node_id = self . node . id ) #NEWLINE# data = self . get_json ( ( '/ports/detail?node=%s' % 'test-node' ) , expect_errors = True ) #NEWLINE# self . assertEqual ( 0 , mock_get_rpc_node . call_count ) #NEWLINE# self . assertEqual ( http_client . NOT_ACCEPTABLE , data . status_int )