diff --git a/tests/test_dashboard_projects_endpoint.py b/tests/test_dashboard_projects_endpoint.py index 23270d5..090c142 100644 --- a/tests/test_dashboard_projects_endpoint.py +++ b/tests/test_dashboard_projects_endpoint.py @@ -584,8 +584,10 @@ class TestPlanningEndpoints: class TestSseAuth: - def test_sse_stream_requires_cookie(self, stub): - # No Cookie header → handler short-circuits with 401. + def test_sse_stream_requires_cookie(self, stub, monkeypatch): + # Auth is off by default (tailnet-only); without it the stream opens + # and never returns. No Cookie header → handler short-circuits with 401. + monkeypatch.setenv("DASHBOARD_AUTH", "on") stub.path = "/api/projects/stream" stub.command = "GET" stub.handle_projects_stream()