system-pri/backend/tests/conftest.py

19 lines
331 B
Python

from typing import Generator
import pytest
from flask import Flask
from flask.testing import FlaskClient
from app import create_app
@pytest.fixture()
def app() -> Generator[Flask, None, None]:
app = create_app("testing")
yield app
@pytest.fixture()
def client(app: Flask) -> FlaskClient:
return app.test_client()