diff --git a/nanobot/providers/anthropic_oauth.py b/nanobot/providers/anthropic_oauth.py index 586e7aa..431746e 100644 --- a/nanobot/providers/anthropic_oauth.py +++ b/nanobot/providers/anthropic_oauth.py @@ -455,7 +455,7 @@ class AnthropicOAuthProvider(LLMProvider): import datetime import os header_dump = { - "timestamp": datetime.datetime.utcnow().isoformat(), + "timestamp": datetime.datetime.now(datetime.UTC).isoformat(), "status_code": response.status_code, "model": payload.get("model"), "headers": dict(response.headers), diff --git a/tests/test_agent_loop_tool_result.py b/tests/test_agent_loop_tool_result.py index 44cc0d7..57b0a2a 100644 --- a/tests/test_agent_loop_tool_result.py +++ b/tests/test_agent_loop_tool_result.py @@ -28,7 +28,7 @@ def mock_session_manager(): "messages": [], "metadata": {}, }) - session_mgr.save = AsyncMock() + session_mgr.save = MagicMock() # Synchronous in production, not async return session_mgr