Пример #1
0
 def test_get_all(self):
     '''
     Test for Return all installed services
     '''
     with patch.dict(launchctl.__salt__,
                     {'cmd.run': MagicMock(return_value='A\tB\tC\t\n')}):
         with patch.object(launchctl,
                           '_available_services',
                           return_value={'A': 'a', 'B': 'b'}):
             self.assertEqual(launchctl.get_all(), ['A', 'B', 'C'])
Пример #2
0
 def test_get_all(self):
     '''
     Test for Return all installed services
     '''
     with patch.dict(launchctl.__salt__,
                     {'cmd.run': MagicMock(return_value='A\tB\tC\t\n')}):
         with patch.object(launchctl,
                           '_available_services',
                           return_value={'A': 'a', 'B': 'b'}):
             self.assertEqual(launchctl.get_all(), ['A', 'B', 'C'])