예제 #1
0
파일: munin_test.py 프로젝트: DaveQB/salt
 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}})
예제 #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}})
예제 #3
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}), patch(
             "salt.modules.munin.list_plugins",
             MagicMock(return_value=["uptime"])):
         self.assertDictEqual(munin.run_all(), {"uptime": {"uptime": 0.01}})