Add pytest suite for sample locations with recorded fixtures

Tests replay pre-recorded WDQS and Wikidata API responses so they run
offline against only the local PostGIS database. capture_fixtures.py
records live responses into tests/fixtures/ for later replay.
This commit is contained in:
Edward Betts 2026-04-19 14:07:51 +01:00
parent 6a5d5d0c2f
commit 7790d10f08
3 changed files with 214 additions and 0 deletions

17
tests/conftest.py Normal file
View file

@ -0,0 +1,17 @@
"""Shared pytest fixtures."""
import pytest
@pytest.fixture(scope="session")
def flask_app():
"""Return the Flask application."""
from lookup import app
return app
@pytest.fixture(scope="session")
def app_ctx(flask_app):
"""Push a Flask application context for the whole test session."""
with flask_app.app_context():
yield