From 4a220db513db184965fad051cf9e5fe81582cb3d Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Tue, 2 Jun 2026 19:12:14 -0400 Subject: [PATCH] test(mcp): import resolve_bearer at module level CI fix for aef5009: test_resolve_bearer_none_for_invalid referenced resolve_bearer but the import lived inside an earlier test only. Hoist it to the module import. Production code unaffected (1 failed / 284 passed). Co-Authored-By: Claude Opus 4.8 (1M context) --- tests/test_mcp_auth.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test_mcp_auth.py b/tests/test_mcp_auth.py index cf2493d..2f75b7c 100644 --- a/tests/test_mcp_auth.py +++ b/tests/test_mcp_auth.py @@ -3,7 +3,7 @@ from unittest.mock import AsyncMock, MagicMock, patch import pytest -from fabledassistant.mcp.auth import resolve_bearer_to_user_id +from fabledassistant.mcp.auth import resolve_bearer, resolve_bearer_to_user_id @pytest.mark.asyncio @@ -55,7 +55,6 @@ async def test_resolve_bearer_calls_lookup_with_stripped_token(): @pytest.mark.asyncio async def test_resolve_bearer_returns_user_id_and_scope(): - from fabledassistant.mcp.auth import resolve_bearer fake_key = MagicMock() fake_key.user_id = 9 fake_key.scope = "read"