from fastapi.testclient import TestClient from app.main import create_app def test_visitor_token_endpoint_returns_short_lived_bearer_token() -> None: with TestClient(create_app()) as client: response = client.post("/api/v1/visitor-tokens") assert response.status_code == 201 body = response.json() assert isinstance(body["access_token"], str) assert body["token_type"] == "Bearer" assert body["expires_in"] == 900