Skip to content

🕷️ The BEST Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev

tests: update tests for mcp

Karim shoair6f0ce428aaad
diff --git a/tests/ai/test_ai_mcp.py b/tests/ai/test_ai_mcp.py
index d7f8b84..4a9e308 100644
--- a/tests/ai/test_ai_mcp.py
+++ b/tests/ai/test_ai_mcp.py
@@ -1,6 +1,5 @@
import pytest
import pytest_httpbin
-from unittest.mock import Mock, patch
from scrapling.core.ai import ScraplingMCPServer, ResponseModel
@@ -17,11 +16,6 @@ class TestMCPServer:
def server(self):
return ScraplingMCPServer()
- def test_server_creation(self, server):
- """Test server instance creation"""
- assert server._server is not None
- assert server._server.name == "Scrapling"
-
def test_get_tool(self, server, test_url):
"""Test the get tool method"""
result = server.get(url=test_url, extraction_type="markdown")
@@ -62,9 +56,3 @@ class TestMCPServer:
"""Test the bulk_stealthy_fetch tool method"""
result = await server.bulk_stealthy_fetch(urls=(test_url, test_url), headless=True)
assert all(isinstance(r, ResponseModel) for r in result)
-
- def test_serve_method(self, server):
- """Test the serve method"""
- with patch.object(server._server, 'run') as mock_run:
- server.serve()
- mock_run.assert_called_once_with(transport="stdio")