| 12345678910111213141516171819202122232425 | import osimport pytestfrom flask import Flask# Getting the absolute path of the current file's directoryABS_PATH = os.path.dirname(os.path.abspath(__file__))# Getting the absolute path of the project's root directoryPROJECT_DIR = os.path.abspath(os.path.join(ABS_PATH, os.pardir, os.pardir))CACHED_APP = Flask(__name__)CACHED_APP.config.update({"TESTING": True})@pytest.fixturedef app() -> Flask:    return CACHED_APP@pytest.fixture(autouse=True)def _provide_app_context(app: Flask):    with app.app_context():        yield
 |