18 lines
358 B
Python
18 lines
358 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
|