aswi2021jmsd-gitlab4/tests/unit_tests/rest_api/conftest.py @ a0d4dda1
1 | a0d4dda1 | Captain_Trojan | import pytest |
---|---|---|---|
2 | from swagger_server.__main__ import app as flask_app, setup |
||
3 | from src.db.setup_database import setup_database |
||
4 | |||
5 | |||
6 | @pytest.fixture(scope="session") |
||
7 | def server(): |
||
8 | setup_database() |
||
9 | setup(flask_app) |
||
10 | flask_app.app.testing = True |
||
11 | with flask_app.app.test_client() as s: |
||
12 | yield s |