feat: finish forecast rendering and account-authenticated API explorer

This commit is contained in:
Pigway
2026-10-02 09:27:44 +08:00
parent e67b4ceb6e
commit d10b07c464
8 changed files with 83 additions and 10 deletions
+10
View File
@@ -115,3 +115,13 @@ def test_reset_template(client):
client.get("/api/v1/templates/quote").json()["defaults"]["title"]
!= "Saved title"
)
def test_openapi_describes_cookie_auth_and_docs_csrf(client):
schema = client.get("/openapi.json").json()
cookie = schema["components"]["securitySchemes"]["AccountSession"]
assert cookie["in"] == "cookie" and cookie["name"] == "frameflow_session"
assert {"AccountSession": []} in schema["paths"]["/api/v1/devices"]["get"][
"security"
]
assert "X-CSRF-Token" in client.get("/docs").text