from fastapi.testclient import TestClient

from app.main import app


def test_public_pages_load():
    client = TestClient(app)
    for path in ["/", "/events", "/schedule", "/sponsors", "/partners", "/about", "/register", "/health"]:
        response = client.get(path)
        assert response.status_code == 200


def test_events_api_contains_modules():
    client = TestClient(app)
    response = client.get("/api/events")
    assert response.status_code == 200
    data = response.json()
    assert len(data["modules"]) == 15
