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.
17 lines
357 B
Python
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
|