## Description

Sets the `CELERY_SKIP_CHECKS` value to a string value (`'true'`) instead of a Boolean. Updates the existing test to patch in this string value instead of `True`

An integration test that validates that command line argument handling in `celery/bin/celery.py` matches the unit test assumptions would be a nice addition. However, since it should test more than just this option, it is far enough afield that I have not added it.

Fixes #8461.
Use string value for CELERY_SKIP_CHECKS envvar. ## Description

Sets the `CELERY_SKIP_CHECKS` value to a string value (`'true'`) instead of a Boolean. Updates the existing test to patch in this string value instead of `True`

An integration test that validates that command line argument handling in `celery/bin/celery.py` matches the unit test assumptions would be a nice addition. However, since it should test more than just this option, it is far enough afield that I have not added it.

Fixes #8461.
import pytest
from click.testing import CliRunner

from celery.app.log import Logging
from celery.bin.celery import celery


@pytest.fixture(scope='session')
def use_celery_app_trap():
    return False


def test_cli(isolated_cli_runner: CliRunner):
    Logging._setup = True  # To avoid hitting the logging sanity checks
    res = isolated_cli_runner.invoke(
        celery,
        ["-A", "t.unit.bin.proj.app", "worker", "--pool", "solo"],
        catch_exceptions=False
    )
    assert res.exit_code == 1, (res, res.stdout)

import os
from unittest.mock import patch

import pytest
from click.testing import CliRunner

from celery.app.log import Logging
from celery.bin.celery import celery


@pytest.fixture(scope='session')
def use_celery_app_trap():
    return False


def test_cli(isolated_cli_runner: CliRunner):
    Logging._setup = True  # To avoid hitting the logging sanity checks
    res = isolated_cli_runner.invoke(
        celery,
        ["-A", "t.unit.bin.proj.app", "worker", "--pool", "solo"],
        catch_exceptions=False
    )
    assert res.exit_code == 1, (res, res.stdout)


def test_cli_skip_checks(isolated_cli_runner: CliRunner):
    Logging._setup = True  # To avoid hitting the logging sanity checks
    with patch.dict(os.environ, clear=True):
        res = isolated_cli_runner.invoke(
            celery,
            ["-A", "t.unit.bin.proj.app", "--skip-checks", "worker", "--pool", "solo"],
            catch_exceptions=False,
        )
        assert res.exit_code == 1, (res, res.stdout)
        assert os.environ["CELERY_SKIP_CHECKS"] == "true", "should set CELERY_SKIP_CHECKS"
