示例#1
0
 def test_reload_(self):
     """
     Test for Reload the named service
     """
     mock = MagicMock(return_value=True)
     with patch.dict(gentoo_service.__salt__, {'cmd.retcode': mock}):
         self.assertFalse(gentoo_service.reload_('name'))
     mock.assert_called_once_with('/etc/init.d/name reload', python_shell=False)
示例#2
0
 def test_reload_(self):
     """
     Test for Reload the named service
     """
     mock = MagicMock(return_value=True)
     with patch.dict(gentoo_service.__salt__, {'cmd.retcode': mock}):
         self.assertFalse(gentoo_service.reload_('name'))
     mock.assert_called_once_with('/etc/init.d/name reload', python_shell=False)