def test_restart(self): ''' Test if it restart service via s6. This will stop/start service. ''' mock_ret = MagicMock(return_value=False) with patch.dict(s6.__salt__, {'cmd.retcode': mock_ret}): self.assertTrue(s6.restart('ssh'))
def test_restart(self): """ Test if it restart service via s6. This will stop/start service. """ mock_ret = MagicMock(return_value=False) with patch.dict(s6.__salt__, {"cmd.retcode": mock_ret}): self.assertTrue(s6.restart("ssh"))