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")
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")