#NEWLINE# @ mock . patch . object ( TaskProcessor , 'ensure_task_based_deploy_allowed' ) #NEWLINE# @ fake_tasks ( mock_rpc = True , fake_rpc = True , override_state = { #NEWLINE# #INDENT# 'status' : consts . NODE_STATUSES . ready , #NEWLINE# #UNINDENT# } ) #NEWLINE# def test_task_executed_on_adding_node( self , * _ ) : #NEWLINE# #INDENT# task = self . env . launch_deployment ( self . cluster . id ) #NEWLINE# self . assertEqual ( task . status , consts . TASK_STATUSES . ready ) #NEWLINE# self . assertEqual ( consts . CLUSTER_STATUSES . operational , self . cluster . status ) #NEWLINE# self . env . create_node ( api = False , cluster_id = self . cluster . id , roles = [ 'compute' ] , pending_addition = True ) #NEWLINE# self . check_reexecute_task_on_cluster_update ( )