Added basic users and tasks endpoints tests

This commit is contained in:
Marcin-Ramotowski
2025-03-27 19:14:12 +00:00
parent f8c0c39345
commit d870bcc613
3 changed files with 104 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()