From 62ee7ca4aba0d96e0d4ea49db57d1b0ac5e931eb Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Wed, 14 Oct 2026 10:06:27 -0400 Subject: [PATCH] test: authenticate the e2e API client as the forum service user The forum HTTP API now requires a staff caller (GHSA-c6fp-f54c-6cv4), and tests/conftest.py's api_client fixture logs in as a staff service account for that reason. tests/e2e/conftest.py overrode that fixture with an anonymous client, so every e2e request got a 403. Drop the override so the e2e suite uses the authenticated fixture from tests/conftest.py. Co-Authored-By: Claude Opus 5.5 --- tests/e2e/conftest.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/tests/e2e/conftest.py b/tests/e2e/conftest.py index 7ee86d5c..0381d407 100644 --- a/tests/e2e/conftest.py +++ b/tests/e2e/conftest.py @@ -10,7 +10,6 @@ from pymongo.errors import ServerSelectionTimeoutError from forum.mongo import get_database -from test_utils.client import APIClient log = logging.getLogger(__name__) @@ -18,12 +17,6 @@ MONGO_SLEEP_INTERVAL = 5 -@pytest.fixture(name="api_client") -def fixture_api_client() -> APIClient: - """Create an API client for testing.""" - return APIClient() - - def wait_for_mongodb() -> None: """Wait for MongoDB to start.""" db = get_database()