26 lines
714 B
Python
26 lines
714 B
Python
"""Integration tests for API endpoints."""
|
|
|
|
import pytest
|
|
from fastapi.testclient import TestClient
|
|
|
|
from backend.main import app
|
|
|
|
client = TestClient(app)
|
|
|
|
|
|
@pytest.mark.integration
|
|
class TestAPIIntegration:
|
|
"""Integration tests for API endpoints."""
|
|
|
|
def test_health_check(self) -> None:
|
|
"""Test API health check endpoint."""
|
|
response = client.get("/health")
|
|
assert response.status_code == 200
|
|
assert response.json() == {"status": "healthy"}
|
|
|
|
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"}
|