Exemplo n.º 1
0
 def test_none(self):
     """
     """
     ret = {
         "pid": 12345,
         "retcode": 1,
         "stderr": "stderr: Cannot talk to Tuned daemon via DBus. Is Tuned daemon running?",
         "stdout": "No current active profile.",
     }
     mock_cmd = MagicMock(return_value=ret)
     with patch.dict(tuned.__salt__, {"cmd.run_all": mock_cmd}):
         self.assertEqual(tuned.active(), "none")
Exemplo n.º 2
0
 def test_none(self):
     '''
     '''
     ret = {
         'pid': 12345,
         'retcode': 1,
         'stderr':
         'stderr: Cannot talk to Tuned daemon via DBus. Is Tuned daemon running?',
         'stdout': 'No current active profile.'
     }
     mock_cmd = MagicMock(return_value=ret)
     with patch.dict(tuned.__salt__, {'cmd.run_all': mock_cmd}):
         self.assertEqual(tuned.active(), 'none')