#NEWLINE# @ fake_tasks ( ) #NEWLINE# @ mock . patch . object ( task . DeletionTask , 'execute' ) #NEWLINE# def test_deletion_task_w_check_ceph( self , mdeletion_execute ) : #NEWLINE# #INDENT# cluster = self . env . create_cluster ( ) #NEWLINE# self . env . create_node ( api = False , cluster_id = cluster . id , pending_addition = False , pending_deletion = True , status = NODE_STATUSES . ready , roles = [ 'controller' ] ) #NEWLINE# manager_ = manager . ApplyChangesTaskManager ( cluster . id ) #NEWLINE# manager_ . execute ( ) #NEWLINE# self . assertEqual ( mdeletion_execute . call_count , 1 ) #NEWLINE# kwargs = mdeletion_execute . call_args [ 1 ] #NEWLINE# self . assertEqual ( kwargs [ 'check_ceph' ] , True )