#NEWLINE# def test_update_cluster_to_operational( self ) : #NEWLINE# #INDENT# task = Task ( name = consts . TASK_NAMES . deployment , cluster = self . cluster , status = consts . TASK_STATUSES . ready ) #NEWLINE# self . db . add ( node ) #NEWLINE# self . db . flush ( ) #NEWLINE# for node in self . env . nodes : #NEWLINE# #INDENT# node . status = consts . NODE_STATUSES . ready #NEWLINE# #UNINDENT# objects . Task . _update_cluster_data ( task ) #NEWLINE# self . db . flush ( ) #NEWLINE# self . assertEqual ( self . cluster . status , consts . CLUSTER_STATUSES . operational ) #NEWLINE# self . assertFalse ( self . cluster . is_locked ) #NEWLINE# self . assertTrue ( self . cluster . attributes . generated [ 'deployed_before' ] [ 'value' ] )