2024-02-19 08:14:35 +00:00
|
|
|
from app import app
|
|
|
|
from flask.testing import FlaskClient
|
|
|
|
import pytest
|
|
|
|
import os
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture(scope="module")
|
|
|
|
def test_client() -> FlaskClient:
|
|
|
|
""" Test that required environment variables are set
|
|
|
|
ahead of runtime
|
|
|
|
"""
|
|
|
|
os.environ['CONFIG_TYPE'] = 'config.TestingConfig'
|
|
|
|
|
|
|
|
with app.test_client() as testing_client:
|
|
|
|
with app.app_context():
|
|
|
|
yield testing_client
|