#11 Added extra functional tests for admin endpoints

This commit is contained in:
2024-02-19 08:14:35 +00:00
parent 263bea92f4
commit d056146a44
2 changed files with 28 additions and 14 deletions

View File

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