#NEWLINE# def test_rvm( self ) : #NEWLINE# #INDENT# mock = MagicMock ( return_value = { #NEWLINE# #INDENT# 'retcode' : 0 , #NEWLINE# 'stdout' : '' , #NEWLINE# #UNINDENT# } ) #NEWLINE# with patch . dict ( rvm . __salt__ , { #NEWLINE# #INDENT# 'cmd.run_all' : self , #NEWLINE# #UNINDENT# } ) : #NEWLINE# #INDENT# rvm . _rvm ( [ 'install' , '1.9.3' ] ) #NEWLINE# mock . assert_called_once_with ( [ '/usr/local/rvm/bin/rvm' , 'install' , '1.9.3' ] , runas = None , cwd = None , python_shell = False )