Files
plex-playlist/backend/tests/integration/test_api.py
T

26 lines
714 B
Python
Raw Normal View History

2025-10-19 21:35:02 -04:00
"""Integration tests for API endpoints."""
import pytest
2025-10-23 13:45:54 -04:00
from fastapi.testclient import TestClient
2025-10-30 08:09:45 -04:00
from backend.main import app
2025-10-23 13:45:54 -04:00
client = TestClient(app)
2025-10-19 21:35:02 -04:00
@pytest.mark.integration
class TestAPIIntegration:
"""Integration tests for API endpoints."""
def test_health_check(self) -> None:
"""Test API health check endpoint."""
2025-10-23 13:45:54 -04:00
response = client.get("/health")
assert response.status_code == 200
assert response.json() == {"status": "healthy"}
2025-10-19 21:35:02 -04:00
2025-10-23 13:45:54 -04:00
def test_root_endpoint(self) -> None:
"""Test root endpoint."""
response = client.get("/")
assert response.status_code == 200
assert response.json() == {"message": "Plex Playlist Backend API"}