incorporeal-cms/tests/conftest.py

23 lines
450 B
Python

"""Create the test app and other fixtures."""
import os
import pytest
from incorporealcms import create_app
HERE = os.path.dirname(os.path.abspath(__file__))
@pytest.fixture
def app():
"""Create the Flask application, with test settings."""
app = create_app(instance_path=os.path.join(HERE, 'instance'))
yield app
@pytest.fixture
def client(app):
"""Create a test client based on the test app."""
return app.test_client()