Пример #1
0
 def test_start(self):
     """
     Test for Start the specified service
     """
     mock = MagicMock(return_value=True)
     with patch.dict(gentoo_service.__salt__, {'cmd.retcode': mock}):
         self.assertFalse(gentoo_service.start('name'))
     mock.assert_called_once_with('/etc/init.d/name start', python_shell=False)
Пример #2
0
 def test_start(self):
     """
     Test for Start the specified service
     """
     mock = MagicMock(return_value=True)
     with patch.dict(gentoo_service.__salt__, {'cmd.retcode': mock}):
         self.assertFalse(gentoo_service.start('name'))
     mock.assert_called_once_with('/etc/init.d/name start', python_shell=False)