def test_available(self):
     """
     Test to returns ``True`` if the specified service is available,
     otherwise returns ``False``.
     """
     with patch.dict(smf.__salt__,
                     {"cmd.run": MagicMock(return_value="A")}):
         with patch.object(smf, "get_all", return_value=("A")):
             self.assertTrue(smf.available("A"))
Beispiel #2
0
 def test_available(self):
     '''
     Test to returns ``True`` if the specified service is available,
     otherwise returns ``False``.
     '''
     with patch.dict(smf.__salt__,
                     {'cmd.run': MagicMock(return_value='A')}):
         with patch.object(smf, 'get_all', return_value=('A')):
             self.assertTrue(smf.available('A'))