def test_correct_configuration_with_django_setting_from_env(boolean_value: str) -> None:
    """Django settings module gets extracted given valid configuration."""
    config_file_contents = "\n".join(
        [
            "[mypy.plugins.django-stubs]",
            "some_other_setting = setting",
            f"strict_settings = {boolean_value}",
        ]
    )
    django_settings_env_value = "my.module"

    with write_to_file(config_file_contents) as filename:
        with mock.patch.dict(os.environ, {"DJANGO_SETTINGS_MODULE": django_settings_env_value}):
            config = DjangoPluginConfig(filename)

    assert config.django_settings_module == django_settings_env_value
    assert config.strict_settings is (boolean_value.lower() == "true")
Django settings module gets extracted given valid configuration.
tests/test_error_handling.py