def test_load_nested_different_types(ext, tmpdir):
    """Load a TOML file that includes other various settings file types."""

    settings_file = tmpdir.join("settings.toml")
    settings_file.write(MIXED.format(ext))

    toml_plugin_file = tmpdir.join("plugin1.toml")
    toml_plugin_file.write(TOML_PLUGIN)

    json_plugin_file = tmpdir.join(f"plugin2.{ext}")
    json_plugin_file.write(PLUGIN_TEXT[ext])

    settings = LazySettings(
        environments=True,
        ENV_FOR_DYNACONF="DEFAULT",
        silent=False,
        LOADERS_FOR_DYNACONF=False,
        ROOT_PATH_FOR_DYNACONF=str(tmpdir),
        SETTINGS_FILE_FOR_DYNACONF=str(settings_file),
    )

    assert settings.DEBUG is False
    assert settings.DATABASE_URI == f"{ext}.example.com"
    assert settings.PORT == 8080
    assert settings.SERVER == "toml.example.com"
    assert settings.PLUGIN_NAME == "testing"
Load a TOML file that includes other various settings file types.
tests/test_nested_loading.py