cteward-ng/cteward_ng/tests/conftest.py
2026-06-08 20:33:47 +02:00

26 lines
562 B
Python

"""Test fixtures and app factory for the test suite."""
import os
import pytest
from cteward_ng.app import create_app
# Resolve the test config relative to this package directory
_TEST_CONFIG = os.path.join(
os.path.dirname(__file__), '..', 'st-lexware-test.json'
)
@pytest.fixture
def app():
"""Create a test Flask app using the test config."""
app = create_app(config_path=_TEST_CONFIG)
app.config['TESTING'] = True
return app
@pytest.fixture
def client(app):
"""Test client for making requests."""
return app.test_client()