Esempio n. 1
0
 def test_delete_default_with_user(self):
     '''
         Test delete a default setting as a specific user
     '''
     mock = MagicMock()
     with patch.dict(macdefaults.__salt__, {'cmd.run_all': mock}):
         macdefaults.delete('com.apple.CrashReporter', 'Crash', user="******")
         mock.assert_called_once_with('defaults delete "com.apple.CrashReporter" "Crash"', output_loglevel='debug', runas="frank")
Esempio n. 2
0
 def test_delete_default_with_user(self):
     '''
         Test delete a default setting as a specific user
     '''
     mock = MagicMock()
     with patch.dict(macdefaults.__salt__, {'cmd.run_all': mock}):
         macdefaults.delete('com.apple.CrashReporter', 'Crash', user="******")
         mock.assert_called_once_with('defaults delete "com.apple.CrashReporter" "Crash"', output_loglevel='debug', runas="frank")