#NEWLINE# @ patch ( 'salt.utils.which' , ( lambda exe : exe ) ) #NEWLINE# def test_create( self ) : #NEWLINE# #INDENT# mock = MagicMock ( return_value = 'salt' ) #NEWLINE# with patch . dict ( mdadm . __salt__ , { #NEWLINE# #INDENT# 'cmd.run' : mock , #NEWLINE# #UNINDENT# } ) : #NEWLINE# #INDENT# ret = mdadm . create ( '/dev/md0' , 5 , devices = [ '/dev/sdb1' , '/dev/sdc1' , '/dev/sdd1' ] , test_mode = False , force = True , chunk = 256 ) #NEWLINE# self . assertEqual ( 'salt' , self ) #NEWLINE# mock . assert_called_once_with ( [ 'mdadm' , '-C' , '/dev/md0' , '-R' , '-v' , '--chunk' , '256' , '--force' , '-l' , '5' , '-e' , 'default' , '-n' , '3' , '/dev/sdb1' , '/dev/sdc1' , '/dev/sdd1' ] , python_shell = False )