Test the revision lock of the CLI stages

The `@db_revision` decorator no longer skips its check under `TESTING`.

The tests replace `current_db_revision()` with the revision they need.
This commit is contained in:
Alexander Hess 2026-12-02 13:41:50 +01:00
commit 2add322a25
Signed by: alexander
GPG key ID: B46EDB4DFC26805D

View file

@ -47,6 +47,13 @@ def test_two_pixels_with_two_addresses(
# Hack the configuration regarding the grids to be created.
monkeypatch.setattr(velofy.config, "GRID_SIDE_LENGTHS", (side_length,))
# The `gridify` stage is locked to the revision it was carried out at.
monkeypatch.setattr(
gridify.decorators,
"current_db_revision",
lambda: "e86290e7305e",
)
result = cli.invoke(gridify.gridify)
assert result.exit_code == 0