system-pri/backend/tests/conftest.py

19 lines
331 B
Python
Raw Normal View History

2022-05-15 21:20:05 +02:00
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()