Expand lab seed tiers, OpenAPI PARAMS, and console DATA/Params UX.

This commit is contained in:
2026-07-18 08:46:39 +03:00
parent f8d3cbdd59
commit 63cc409424
71 changed files with 38380 additions and 796 deletions
+26
View File
@@ -0,0 +1,26 @@
"""HEAD is served for GET Automation routes (contract matrix)."""
from __future__ import annotations
from fastapi import FastAPI
from fastapi.testclient import TestClient
from app.api.middleware import HeadAsGetMiddleware
def test_head_as_get_middleware_strips_body() -> None:
app = FastAPI()
app.add_middleware(HeadAsGetMiddleware)
@app.get("/api/vcenter/vm")
def list_vms() -> list[dict[str, str]]:
return [{"vm": "vm-101", "name": "web-01"}]
client = TestClient(app)
get = client.get("/api/vcenter/vm")
assert get.status_code == 200
assert get.json()[0]["vm"] == "vm-101"
head = client.head("/api/vcenter/vm")
assert head.status_code == 200
assert head.content in (b"", None) or head.text == ""