mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-27 07:50:43 +02:00
Replace subprocess tests with in-process async servers (#2006)
* Use anyio as testing backend * Remove asyncio markers * Update streamable http tests * Replace all subprocess tests * Replace anyio task groups with asyncio context managers in tests - Convert run_server_async from anyio task group pattern to asyncio.create_task with async context manager - Remove task_group fixture from conftest - Update all test fixtures to use async with run_server_async pattern - Remove TaskGroup imports from all test files - Tests now work with pytest-asyncio instead of pytest-anyio * Update test_github_provider_integration.py
This commit is contained in:
parent
39aebcf578
commit
3321644ad3
28 changed files with 411 additions and 358 deletions
|
|
@ -177,7 +177,6 @@ class TestGitHubTokenVerifier:
|
|||
) # Parent TokenVerifier sets empty list as default
|
||||
assert verifier.timeout_seconds == 10
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_verify_token_github_api_failure(self):
|
||||
"""Test token verification when GitHub API returns error."""
|
||||
verifier = GitHubTokenVerifier()
|
||||
|
|
@ -196,7 +195,6 @@ class TestGitHubTokenVerifier:
|
|||
result = await verifier.verify_token("invalid_token")
|
||||
assert result is None
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_verify_token_success(self):
|
||||
"""Test successful token verification."""
|
||||
from unittest.mock import AsyncMock
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue