#NEWLINE# def test_update_node_fails( self ) : #NEWLINE# #INDENT# validate_update = self . driver . validate_update = mock . Mock ( ) #NEWLINE# prof = self . _create_service_profile ( service_type = 'LOADBALANCER' , vendor = self . SERVICE_PROFILE_VENDOR ) [ 'service_profile' ] #NEWLINE# node_id = self . create_servicechain_node ( service_profile_id = prof [ 'id' ] , config = self . DEFAULT_LB_CONFIG , expected_res_status = 201 ) [ 'servicechain_node' ] [ 'id' ] #NEWLINE# spec = self . create_servicechain_spec ( nodes = [ node_id ] , expected_res_status = 201 ) [ 'servicechain_spec' ] #NEWLINE# prs = self . _create_redirect_prs ( node_id [ 'id' ] ) [ 'policy_rule_set' ] #NEWLINE# self . create_policy_target_group ( provided_policy_rule_sets = { #NEWLINE# #INDENT# prs [ 'id' ] : '' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . create_policy_target_group ( consumed_policy_rule_sets = { #NEWLINE# #INDENT# prs [ 'id' ] : '' , #NEWLINE# #UNINDENT# } ) #NEWLINE# validate_update . side_effect = exc . NodeCompositionPluginBadRequest ( resource = 'node' , msg = 'reason' ) #NEWLINE# res = self . update_servicechain_node ( node_id , description = 'somethingelse' , expected_res_status = 400 ) #NEWLINE# self . assertEqual ( 'NodeCompositionPluginBadRequest' , res [ 'NeutronError' ] [ 'type' ] )