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:
parent
6a5d5d0c2f
commit
7790d10f08
3 changed files with 214 additions and 0 deletions
17
tests/conftest.py
Normal file
17
tests/conftest.py
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue