Fix tests

This commit is contained in:
Chris Coutinho
2025-05-06 16:44:33 +02:00
parent e1de793af8
commit dea882c2f5
5 changed files with 249 additions and 209 deletions
+16
View File
@@ -0,0 +1,16 @@
import pytest
import os
import logging
from nextcloud_mcp_server.client import NextcloudClient
logger = logging.getLogger(__name__)
@pytest.fixture(scope="session")
def nc_client() -> NextcloudClient:
"""
Fixture to create a NextcloudClient instance for integration tests.
"""
assert os.getenv("NEXTCLOUD_HOST"), "NEXTCLOUD_HOST env var not set"
assert os.getenv("NEXTCLOUD_USERNAME"), "NEXTCLOUD_USERNAME env var not set"
assert os.getenv("NEXTCLOUD_PASSWORD"), "NEXTCLOUD_PASSWORD env var not set"
return NextcloudClient.from_env()