#NEWLINE# def test_update_nodes_to_error_if_deployment_task_failed( self ) : #NEWLINE# #INDENT# self . cluster . nodes [ 0 ] . status = consts . NODE_STATUSES . deploying #NEWLINE# self . cluster . nodes [ 0 ] . progress = 12 #NEWLINE# task = Task ( name = consts . TASK_NAMES . deployment , cluster = self . cluster , status = consts . TASK_STATUSES . error ) #NEWLINE# self . db . add ( task ) #NEWLINE# self . db . flush ( ) #NEWLINE# objects . Task . _update_cluster_data ( task ) #NEWLINE# self . db . flush ( ) #NEWLINE# self . assertEquals ( self . cluster . status , consts . CLUSTER_STATUSES . error ) #NEWLINE# self . assertFalse ( self . cluster . is_locked ) #NEWLINE# self . _node_should_be_error_with_type ( self . cluster . nodes [ 0 ] , consts . NODE_ERRORS . deploy ) #NEWLINE# self . _nodes_should_not_be_error ( self . cluster . nodes [ 1 : ] )