def test_lowercase_read_mode(tmpdir):
    """
    Starting on 3.0.0 lowercase keys are enabled by default
    """
    data = {
        "foo": "bar",
        "hello": "world",
        "default": 1,
        "databases": {"default": {"port": 8080}},
    }
    toml_loader.write(str(tmpdir.join("settings.toml")), data)

    # settings_files misspelled.. should be `settings_file`
    settings = LazySettings(settings_files="settings.toml")

    assert settings.FOO == "bar"
    assert settings.foo == "bar"
    assert settings.HELLO == "world"
    assert settings.hello == "world"
    assert settings.DEFAULT == 1
    assert settings.default == 1
    assert settings.DATABASES.default.port == 8080
    assert settings.databases.default.port == 8080

    assert "foo" in settings
    assert "FOO" in settings

    # test __dir__
    results = dir(settings)
    assert "foo" in results
    assert "FOO" in results

    results = dir(settings.databases)
    assert "default" in results
    assert "DEFAULT" in results

    Starting on 3.0.0 lowercase keys are enabled by default
    
tests/test_base.py