#NEWLINE# def test_update_vms_conf( self ) : #NEWLINE# #INDENT# kvm_node = self . cluster . nodes [ 0 ] #NEWLINE# kvm_node . roles = [ consts . VIRTUAL_NODE_TYPES . virt ] #NEWLINE# self . db . flush ( ) #NEWLINE# kvm_node . vms_conf = [ { #NEWLINE# #INDENT# 'id' : 1 , #NEWLINE# 'cluster_id' : self . cluster . id , #NEWLINE# #UNINDENT# } ] #NEWLINE# task = Task ( name = consts . TASK_NAMES . spawn_vms , cluster = self . cluster , status = consts . TASK_STATUSES . ready ) #NEWLINE# self . db . add ( task ) #NEWLINE# self . db . flush ( ) #NEWLINE# objects . Task . _update_cluster_data ( task ) #NEWLINE# self . db . flush ( ) #NEWLINE# for node in self . cluster . nodes : #NEWLINE# #INDENT# if ( consts . VIRTUAL_NODE_TYPES . virt in node . roles ) : #NEWLINE# #INDENT# self . assertTrue ( node . vms_conf [ 0 ] . get ( 'created' ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . assertNotEquals ( node . status , consts . NODE_STATUSES . ready )