def test_read_file_notfound_error_with_default(tmp_path):
    """Assert read_file converter uses default on invalid file"""
    # 1. Create a settings file with the read_file converter
    settings_file = tmp_path / "settings.toml"
    create_file(
        settings_file,
        f"""\
        SECRET_KEY = "@read_file {tmp_path}/non_existent_file DEFAULT_VALUE"
        """,
    )
    # 2. Load the settings
    settings = Dynaconf(
        settings_file=settings_file,
    )
    assert settings.SECRET_KEY == "DEFAULT_VALUE"
Assert read_file converter uses default on invalid file
tests/test_utils.py