#NEWLINE# def test_delete_task( self ) : #NEWLINE# #INDENT# cmd_mock = Mock ( return_value = { #NEWLINE# #INDENT# 'retcode' : 0 , #NEWLINE# #UNINDENT# } ) #NEWLINE# with patch . dict ( kapacitor . __salt__ , { #NEWLINE# #INDENT# 'cmd.run_all' : cmd_mock , #NEWLINE# #UNINDENT# } ) : #NEWLINE# #INDENT# kapacitor . delete_task ( 'taskname' ) #NEWLINE# #UNINDENT# cmd_mock . assert_called_once_with ( 'kapacitor delete tasks taskname' )