Remodel/packages/api/tests/test_templates.py
Mannu e6dc39aa33 [S1-T12/T13] P&L revenue breakdown + collapsible rows + UI polish
- Engine: Add ppa_revenue_cr, mcp_revenue_cr, tariff, units to PnLRow
- Engine: Split PPA vs MCP revenue in P&L computation
- Web: Collapsible rows for PPA/MCP Revenue and Opex
- Web: Highlighted rows (Total Revenue, EBITDA, EBIT, PBT, PAT)
- Web: Units above Tariff in breakdown, bg-blue-50 highlight
- Fix sticky column z-index for horizontal scroll
- CLAUDE.md: Add project documentation

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 10:42:36 +05:30

23 lines
691 B
Python

"""Template endpoints tests (S5-T07)."""
from httpx import AsyncClient
async def test_get_default_cost_items(client: AsyncClient) -> None:
resp = await client.get("/api/templates/cost-items")
assert resp.status_code == 200
items = resp.json()
assert isinstance(items, list)
assert len(items) > 0
first = items[0]
assert "id" in first
assert "name" in first
assert "basis" in first
async def test_get_phasing_templates(client: AsyncClient) -> None:
resp = await client.get("/api/templates/phasing")
assert resp.status_code == 200
templates = resp.json()
assert isinstance(templates, dict)
assert "solar_standard_18mo" in templates