"""Tests for log history routes.""" from fastapi.testclient import TestClient class TestLogHistory: """Tests for GET /history.""" def test_history_requires_profile(self, client: TestClient) -> None: """GET /history should redirect to / without profile cookie.""" response = client.get("/history", follow_redirects=False) assert response.status_code == 302 assert response.headers["location"] == "/" class TestSessionDetail: """Tests for GET /history/.""" def test_session_detail_requires_profile(self, client: TestClient) -> None: """GET /history/1 should redirect to / without profile cookie.""" response = client.get("/history/1", follow_redirects=False) assert response.status_code == 302 assert response.headers["location"] == "/"