def test_hook_runs_after_method():
    """After method the after hooks transforms value."""

    DATABASE = {
        "feature_enabled": True,
    }

    def try_to_get_from_database(d, value, key, *_, **__):
        assert d.get("feature_enabled") is False
        return DATABASE.get(key, value.value)

    class HookedSettings(BaseHookedSettings): ...

    settings = HookedSettings(
        feature_enabled=False,
        something_not_in_database="default value",
        _registered_hooks={
            Action.AFTER_GET: [
                Hook(try_to_get_from_database),
            ],
        },
    )

    # On the object feature is disabled
    # but on the database it is enabled
    assert settings.get("feature_enabled") is True

    # This key is not in the database, so returns regular value
    assert settings.get("something_not_in_database") == "default value"
After method the after hooks transforms value.
tests/test_hooking.py