"""Tests for log history routes.""" from fastapi.testclient import TestClient class TestLogHistory: """Tests for GET /history.""" def test_history_requires_auth(self, client: TestClient) -> None: """GET /history should require admin login.""" response = client.get("/history", follow_redirects=False) assert response.status_code in (401, 303) class TestSessionDetail: """Tests for GET /history/.""" def test_session_detail_requires_auth(self, client: TestClient) -> None: """GET /history/1 should require admin login.""" response = client.get("/history/1", follow_redirects=False) assert response.status_code in (401, 303)