geocode/tests/conftest.py
Edward Betts 7790d10f08 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.
2026-04-19 14:07:51 +01:00

17 lines
357 B
Python

"""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