def test_case_926_workaround(tmp_path):
    """
    The original example is not a bug because toplevel always merges.
    But it can be achieved by explicitly deleting old keys.
    """
    file_a = create_file(
        tmp_path / "a.toml",
        """\
        [default]
        DEBUG = true
        [default.nested]
        Name="Test"
        """,
    )

    file_hooks = create_file(
        tmp_path / "dynaconf_hooks.py",
        """\
        def post(settings):
            data = {}
            if settings.DEBUG:
                data["database_url"] = "sqlite://"
                data["name"] = "@del"
            return data
        """,
    )
    settings = Dynaconf(
        environments=True,
        settings_files=[file_a, file_hooks],
    )

    assert settings.database_url == "sqlite://"
    with pytest.raises(AttributeError):
        settings.name

    The original example is not a bug because toplevel always merges.
    But it can be achieved by explicitly deleting old keys.
    
tests_functional/issues/835_926_enable-merge-equal-false/app_test.py