#NEWLINE# def test_update_cluster_to_error_if_deploy_task_failed( self ) : #NEWLINE# #INDENT# task = Task ( name = consts . TASK_NAMES . deploy , 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 ( task . cluster . status , consts . CLUSTER_STATUSES . error ) #NEWLINE# self . assertFalse ( self . cluster . is_locked )