#11 Starting on the creation of an end to end test environment

This commit is contained in:
2024-02-23 18:24:57 +00:00
parent d056146a44
commit bcde471f33
8 changed files with 41 additions and 28 deletions

View File

@ -1,16 +0,0 @@
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

View File

@ -1,5 +1,5 @@
from flask.testing import FlaskClient
from tests.functional import test_client
from tests import test_client
import pytest