spiffworkflow-backend/conftest.py

24 lines
571 B
Python
Raw Normal View History

2022-05-17 20:47:55 +00:00
"""Conftest."""
2022-05-19 18:38:47 +00:00
import os
import pytest
from flask.app import Flask
2022-05-17 20:47:55 +00:00
from spiff_workflow_webapp import create_app
2022-05-17 20:47:55 +00:00
@pytest.fixture(scope="session")
def app() -> Flask:
2022-05-17 20:47:55 +00:00
"""App."""
2022-05-19 18:38:47 +00:00
os.environ["FLASK_ENV"] = "testing"
app = create_app()
2022-05-19 20:08:38 +00:00
# NOTE: set this here since nox shoves tests and src code to
# different places and this allows us to know exactly where we are at the start
app.config["BPMN_SPEC_ABSOLUTE_DIR"] = (
os.path.join(os.path.dirname(__file__))
+ "/tests/spiff_workflow_webapp/files/bpmn_specs"
)
return app