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:
parent
eb059c1ea5
commit
2add322a25
1 changed files with 56 additions and 14 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue