Team Ai
Apppublic

Underground-Digital/Workflow-Engine

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
conftest.py25 linesDownload Raw Back to unit_tests
1import os2 3import pytest4from flask import Flask5 6# Getting the absolute path of the current file's directory7ABS_PATH = os.path.dirname(os.path.abspath(__file__))8 9# Getting the absolute path of the project's root directory10PROJECT_DIR = os.path.abspath(os.path.join(ABS_PATH, os.pardir, os.pardir))11 12CACHED_APP = Flask(__name__)13CACHED_APP.config.update({"TESTING": True})14 15 16@pytest.fixture17def app() -> Flask:18    return CACHED_APP19 20 21@pytest.fixture(autouse=True)22def _provide_app_context(app: Flask):23    with app.app_context():24        yield25