chore: sort imports

This commit is contained in:
Chris Coutinho
2025-08-01 12:21:32 +02:00
parent a9f3e1b00d
commit 8956945e9d
21 changed files with 76 additions and 56 deletions
+10 -6
View File
@@ -1,18 +1,20 @@
import pytest
import os
import logging
import os
import uuid
from nextcloud_mcp_server.client import NextcloudClient
from typing import Any, AsyncGenerator
import pytest
from httpx import HTTPStatusError
from mcp import ClientSession
from mcp.client.sse import sse_client
from nextcloud_mcp_server.client import NextcloudClient
logger = logging.getLogger(__name__)
@pytest.fixture(scope="session")
async def nc_client() -> NextcloudClient:
async def nc_client() -> AsyncGenerator[NextcloudClient, Any]:
"""
Fixture to create a NextcloudClient instance for integration tests.
Uses environment variables for configuration.
@@ -29,14 +31,16 @@ async def nc_client() -> NextcloudClient:
logger.info(
"NextcloudClient session fixture initialized and capabilities checked."
)
yield client
except Exception as e:
logger.error(f"Failed to initialize NextcloudClient session fixture: {e}")
pytest.fail(f"Failed to connect to Nextcloud or get capabilities: {e}")
return client
finally:
await client.close()
@pytest.fixture
async def nc_mcp_client():
async def nc_mcp_client() -> AsyncGenerator[ClientSession, Any]:
"""
Fixture to create an MCP client session for integration tests.
"""
+2 -1
View File
@@ -1,7 +1,8 @@
import pytest
import logging
import time
import uuid
import pytest
from httpx import HTTPStatusError
from nextcloud_mcp_server.client import NextcloudClient
@@ -1,9 +1,10 @@
"""Integration tests for Calendar CalDAV operations."""
import pytest
import logging
import uuid
from datetime import datetime, timedelta
import pytest
from httpx import HTTPStatusError
from nextcloud_mcp_server.client import NextcloudClient
+4 -3
View File
@@ -1,10 +1,11 @@
import pytest
import logging
import time
import uuid
import logging
from PIL import Image, ImageDraw
from io import BytesIO
import pytest
from httpx import HTTPStatusError # Import if needed for specific error checks
from PIL import Image, ImageDraw
from nextcloud_mcp_server.client import NextcloudClient
+4 -4
View File
@@ -1,11 +1,11 @@
import logging
import pytest
import uuid
import json
import logging
import uuid
import pytest
from mcp import ClientSession
from nextcloud_mcp_server.client import NextcloudClient
from nextcloud_mcp_server.client import NextcloudClient
logger = logging.getLogger(__name__)
pytestmark = pytest.mark.integration
+3 -2
View File
@@ -1,7 +1,8 @@
import pytest
import logging
import asyncio
import logging
import uuid # Keep uuid if needed for generating unique data within tests
import pytest
from httpx import HTTPStatusError
from nextcloud_mcp_server.client import NextcloudClient
+4 -3
View File
@@ -1,9 +1,10 @@
import pytest
import logging
import asyncio
import logging
import uuid
from typing import Any, Dict
import pytest
from httpx import HTTPStatusError
from typing import Dict, Any
from nextcloud_mcp_server.client import NextcloudClient
+2 -1
View File
@@ -1,7 +1,8 @@
import pytest
import logging
import time
import uuid
import pytest
from httpx import HTTPStatusError
from nextcloud_mcp_server.client import NextcloudClient
+2 -1
View File
@@ -1,8 +1,9 @@
"""Integration tests for WebDAV operations."""
import pytest
import logging
import uuid
import pytest
from httpx import HTTPStatusError
from nextcloud_mcp_server.client import NextcloudClient