diff options
Diffstat (limited to 'api/conftest.py')
| -rw-r--r-- | api/conftest.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/api/conftest.py b/api/conftest.py new file mode 100644 index 00000000..1f4831b8 --- /dev/null +++ b/api/conftest.py @@ -0,0 +1,15 @@ +""" +Configuration file for all unit tests. +""" +import pytest + +from main import FLASK_CORE_APP + + +@pytest.fixture +def client(): + """Returns a Flask API client to interact with.""" + FLASK_CORE_APP.config['TESTING'] = True + + with FLASK_CORE_APP.test_client() as client: + yield client |
