Skip to content

Commit 3b304c1

Browse files
abrookinsclaude
andcommitted
Fix async mock in token auth test per review feedback
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 2bd80c0 commit 3b304c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_token_auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ async def test_get_current_user_missing_token(self, mock_settings):
226226
assert exc_info.value.status_code == status.HTTP_401_UNAUTHORIZED
227227
assert "Missing bearer token" in exc_info.value.detail
228228

229-
@patch("agent_memory_server.auth.verify_token")
229+
@patch("agent_memory_server.auth.verify_token", new_callable=AsyncMock)
230230
@pytest.mark.asyncio
231231
async def test_get_current_user_token_auth(self, mock_verify_token, mock_settings):
232232
"""Test get_current_user with token authentication."""

0 commit comments

Comments
 (0)