Beispiel #1
0
 def test_run_all(self):
     '''
     Test if it runs all the munin plugins
     '''
     mock = MagicMock(return_value='uptime.value 0.01')
     with patch.dict(munin.__salt__, {'cmd.run': mock}):
         self.assertDictEqual(munin.run_all(), {'uptime': {'uptime': 0.01}})
Beispiel #2
0
 def test_run_all(self):
     '''
     Test if it runs all the munin plugins
     '''
     mock = MagicMock(return_value='uptime.value 0.01')
     with patch.dict(munin.__salt__, {'cmd.run': mock}):
         self.assertDictEqual(munin.run_all(), {'uptime': {'uptime': 0.01}})
 def test_run_all(self):
     """
     Test if it runs all the munin plugins
     """
     mock = MagicMock(return_value="uptime.value 0.01")
     with patch.dict(munin.__salt__, {"cmd.run": mock}), patch(
             "salt.modules.munin.list_plugins",
             MagicMock(return_value=["uptime"])):
         self.assertDictEqual(munin.run_all(), {"uptime": {"uptime": 0.01}})