import json

from fmu.dataio._model import dump


def test_schema_uptodate():
    # ruff: noqa: E501
    """
    Test to verify if the local schema is up to date with the schema
    generated by pydantic's `dump` method. It compares the content of
    the local `fmu_results.json` with the output of `dump()`.

    To update the local schema, run:
    `./tools/update_schema`
    """
    with open("schema/definitions/0.8.0/schema/fmu_results.json") as f:
        assert json.load(f) == dump()
