Exemplo n.º 1
0
 def test_start(self):
     """
     Test to start the specified service
     """
     with patch.object(os.path, "join", return_value="A"):
         with patch.object(service, "run", MagicMock(return_value=True)):
             self.assertTrue(service.start("name"))
Exemplo n.º 2
0
 def test_start(self):
     '''
     Test to start the specified service
     '''
     with patch.object(os.path, 'join', return_value='A'):
         with patch.object(service, 'run', MagicMock(return_value=True)):
             self.assertTrue(service.start('name'))
Exemplo n.º 3
0
 def test_start(self):
     '''
     Test to start the specified service
     '''
     with patch.object(os.path, 'join', return_value='A'):
         with patch.dict(service.__salt__,
                         {'cmd.retcode': MagicMock(return_value=False)}):
             self.assertTrue(service.start('name'))
Exemplo n.º 4
0
 def test_start(self):
     '''
     Test to start the specified service
     '''
     with patch.object(os.path, 'join', return_value='A'):
         with patch.dict(service.__salt__, {'cmd.retcode':
                                            MagicMock(return_value=False)}):
             self.assertTrue(service.start('name'))