def METHOD_NAME(self):
    """
    Test - remove kernel package
    """
    mock = MagicMock(side_effect=CommandExecutionError())
    with patch.dict(self._kernelpkg.__salt__, {"pkg.purge": mock}):
        with patch.object(
            self._kernelpkg, "active", return_value=self.KERNEL_LIST[-1]
        ):
            with patch.object(
                self._kernelpkg, "list_installed", return_value=self.KERNEL_LIST
            ):
                self.assertRaises(
                    CommandExecutionError,
                    self._kernelpkg.remove,
                    release=self.KERNEL_LIST[0],
                )