def test_missing(self):
     """
     The inverse of service.available.
     Returns ``True`` if the specified service is not 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.assertFalse(smf.missing("A"))
示例#2
0
 def test_missing(self):
     '''
     The inverse of service.available.
     Returns ``True`` if the specified service is not 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.assertFalse(smf.missing('A'))