COSCUP-ap-demo/tests/conftest.py

18 lines
283 B
Python
Raw Normal View History

2023-06-08 05:17:53 +02:00
#!/usr/bin/env python3
2023-06-08 10:54:36 +02:00
"""Build test fixture"""
2023-06-08 05:17:53 +02:00
import pytest
from app import app as flask_app
2023-06-08 10:54:36 +02:00
@pytest.fixture(name="app")
def fixture_app():
"""Build flask app"""
2023-06-08 05:17:53 +02:00
yield flask_app
@pytest.fixture
def client(app):
2023-06-08 10:54:36 +02:00
"""Build test client"""
2023-06-08 05:17:53 +02:00
return app.test_client()