예제 #1
0
 def test_validate(self):
     '''
     Test for Check all services are monitored
     '''
     mock = MagicMock(return_value=0)
     with patch.dict(monit.__salt__, {'cmd.retcode': mock}):
         self.assertTrue(monit.validate())
예제 #2
0
 def test_validate(self):
     '''
     Test for Check all services are monitored
     '''
     mock = MagicMock(return_value=0)
     with patch.dict(monit.__salt__, {'cmd.retcode': mock}):
         self.assertTrue(monit.validate())
예제 #3
0
def test_validate():
    """
    Test for Check all services are monitored
    """
    mock = MagicMock(return_value=0)
    with patch.dict(monit.__salt__, {"cmd.retcode": mock}):
        assert monit.validate()