test: Replace unittest class with simple tests

This commit is contained in:
Chris Coutinho
2025-10-14 01:23:40 +02:00
parent a4ca3e00a0
commit 3c4535da75
2 changed files with 36 additions and 41 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
"""Interactive integration tests for OAuth authentication."""
import os
import logging
import os
import pytest
+5 -10
View File
@@ -9,12 +9,7 @@ logger = logging.getLogger(__name__)
pytestmark = [pytest.mark.integration, pytest.mark.oauth]
class TestOAuthPlaywright:
"""Test automated Playwright OAuth authentication."""
async def test_playwright_oauth_token_acquisition(
self, playwright_oauth_token: str
):
async def test_playwright_oauth_token_acquisition(playwright_oauth_token: str):
"""Test that Playwright can acquire an OAuth token automatically."""
assert playwright_oauth_token is not None
assert isinstance(playwright_oauth_token, str)
@@ -23,7 +18,8 @@ class TestOAuthPlaywright:
f"Successfully acquired OAuth token via Playwright: {playwright_oauth_token[:20]}..."
)
async def test_oauth_client_with_playwright_flow(self, nc_oauth_client_playwright):
async def test_oauth_client_with_playwright_flow(nc_oauth_client_playwright):
"""Test that OAuth client created via Playwright flow can access Nextcloud APIs."""
# Test 1: Check capabilities
capabilities = await nc_oauth_client_playwright.capabilities()
@@ -35,9 +31,8 @@ class TestOAuthPlaywright:
assert isinstance(notes, list)
logger.info(f"OAuth client (Playwright) successfully listed {len(notes)} notes")
async def test_mcp_oauth_client_with_playwright(
self, nc_mcp_oauth_client_playwright
):
async def test_mcp_oauth_client_with_playwright(nc_mcp_oauth_client_playwright):
"""Test that MCP OAuth client via Playwright can execute tools."""
import json