fix(server): Replace ErrorResponses with standard McpErrors

This commit is contained in:
Chris Coutinho
2025-08-31 20:58:12 +02:00
parent d712b5487c
commit ef1fb9e9aa
6 changed files with 99 additions and 86 deletions
+7 -5
View File
@@ -1,12 +1,14 @@
"""Unit tests for Pydantic models and serialization."""
import json
import re
from datetime import datetime, timezone
import json
import logging
import re
from nextcloud_mcp_server.models.base import BaseResponse, SuccessResponse
logger = logging.getLogger(__name__)
def test_timestamp_format_validation():
"""Test that timestamps in BaseResponse are RFC3339 compliant for MCP validation.
@@ -76,7 +78,7 @@ def test_current_broken_format():
assert "+" not in current_format
assert "-" not in current_format[-6:] # Check last 6 chars for timezone
print(f"Current broken format: {current_format}")
print(
logger.info(f"Current broken format: {current_format}")
logger.info(
"This format causes MCP validation errors because it lacks timezone information"
)