"""Cubre la ruta raíz `/`: página de bienvenida por defecto del Golden Path.""" from fastapi.testclient import TestClient def test_root_serves_welcome_page(client: TestClient) -> None: response = client.get("/") assert response.status_code == 200 assert "text/html" in response.headers.get("content-type", "") body = response.text # Mensaje clave: el desarrollo del tenant reemplaza esta página tras commit+push. assert "commit" in body and "push" in body assert "platform" in body.lower() # En el template (sin renderizar) el placeholder sigue presente. assert "__APP_NAME__" in body def test_root_excluded_from_openapi_schema(client: TestClient) -> None: # La welcome page no debe ensuciar el contrato OpenAPI del dev (include_in_schema=False). schema = client.get("/openapi.json").json() assert "/" not in schema.get("paths", {})