Added test for user endpoints

This commit is contained in:
Marcin-Ramotowski
2025-03-27 20:00:45 +00:00
parent 3552c251bf
commit 0891ba7d87
2 changed files with 70 additions and 0 deletions

15
api/tests/conftest.py Normal file
View File

@ -0,0 +1,15 @@
import pytest
from app import create_app
from models import db
@pytest.fixture
def test_client():
"""Creates a new instance of test app."""
app = create_app("testing")
with app.test_client() as client:
with app.app_context():
db.create_all()
yield client
db.session.remove()
db.drop_all()