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) <noreply@anthropic.com>
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user