- 7 pytest tests covering health, upload validation, API responses, schemas - Updated README with architecture diagram, feature list, design decisions - Live demo link and complete API reference
18 lines
498 B
Python
18 lines
498 B
Python
"""Test the elements API endpoints."""
|
|
|
|
import pytest
|
|
from httpx import ASGITransport, AsyncClient
|
|
|
|
from app.main import app
|
|
|
|
|
|
@pytest.mark.asyncio
|
|
async def test_list_projects_returns_list():
|
|
"""Projects endpoint returns a list."""
|
|
transport = ASGITransport(app=app)
|
|
async with AsyncClient(transport=transport, base_url="http://test") as client:
|
|
response = await client.get("/api/projects")
|
|
|
|
assert response.status_code == 200
|
|
assert isinstance(response.json(), list)
|
|
|