🕷️ 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
Python aiai-scrapingautomationcrawlercrawlingcrawling-pythondatadata-extractionmcpmcp-serverplaywrightpythonscrapingselectorsstealthweb-scraperweb-scrapingweb-scraping-pythonwebscrapingxpath
tests: Update all tests according to new update
Karim shoaird6844232eb6d
diff --git a/tests/fetchers/async/test_camoufox_session.py b/tests/fetchers/async/test_camoufox_session.pyindex a2e0075..2971488 100644--- a/tests/fetchers/async/test_camoufox_session.py+++ b/tests/fetchers/async/test_camoufox_session.py@@ -4,7 +4,7 @@ import asyncioimport pytest_httpbin-from scrapling.engines import AsyncStealthySession+from scrapling.engines._browsers import AsyncStealthySession@pytest_httpbin.use_class_based_httpbindiff --git a/tests/fetchers/async/test_dynamic_session.py b/tests/fetchers/async/test_dynamic_session.pyindex 24c6860..d7a4ea9 100644--- a/tests/fetchers/async/test_dynamic_session.py+++ b/tests/fetchers/async/test_dynamic_session.py@@ -3,7 +3,7 @@ import asyncioimport pytest_httpbin-from scrapling.engines import AsyncDynamicSession+from scrapling.engines._browsers import AsyncDynamicSession@pytest_httpbin.use_class_based_httpbindiff --git a/tests/fetchers/test_response_handling.py b/tests/fetchers/test_response_handling.pyindex 7ff0f18..4db96bf 100644--- a/tests/fetchers/test_response_handling.py+++ b/tests/fetchers/test_response_handling.py@@ -1,8 +1,8 @@from unittest.mock import Mockfrom scrapling.parser import Selector-from scrapling.engines.toolbelt import ResponseFactory, Responsefrom scrapling.engines.toolbelt.custom import ResponseEncoding+from scrapling.engines.toolbelt.convertor import ResponseFactory, Responseclass TestResponseFactory:diff --git a/tests/fetchers/test_utils.py b/tests/fetchers/test_utils.pyindex b787d36..4a1563c 100644--- a/tests/fetchers/test_utils.py+++ b/tests/fetchers/test_utils.py@@ -4,7 +4,6 @@ from pathlib import Pathfrom scrapling.engines.toolbelt.custom import ResponseEncoding, StatusText, Responsefrom scrapling.engines.toolbelt.navigation import (construct_proxy_dict,- construct_cdp_url,js_bypass_path)from scrapling.engines.toolbelt.fingerprints import (@@ -216,43 +215,6 @@ class TestConstructProxyDict:construct_proxy_dict({"invalid": "structure"})-class TestConstructCdpUrl:- """Test CDP URL construction"""-- def test_basic_cdp_url(self):- """Test basic CDP URL"""- result = construct_cdp_url("ws://localhost:9222/devtools/browser")- assert result == "ws://localhost:9222/devtools/browser"-- def test_cdp_url_with_params(self):- """Test CDP URL with query parameters"""- params = {"timeout": "30000", "headless": "true"}- result = construct_cdp_url("ws://localhost:9222/devtools/browser", params)-- assert "timeout=30000" in result- assert "headless=true" in result-- def test_cdp_url_without_leading_slash(self):- """Test CDP URL without a leading slash in the path"""- with pytest.raises(ValueError):- construct_cdp_url("ws://localhost:9222devtools/browser")-- def test_invalid_cdp_scheme(self):- """Test invalid CDP URL scheme"""- with pytest.raises(ValueError):- construct_cdp_url("http://localhost:9222/devtools/browser")-- def test_invalid_cdp_netloc(self):- """Test invalid CDP URL network location"""- with pytest.raises(ValueError):- construct_cdp_url("ws:///devtools/browser")-- def test_malformed_cdp_url(self):- """Test malformed CDP URL"""- with pytest.raises(ValueError):- construct_cdp_url("not-a-url")--class TestJsBypassPath:"""Test JavaScript bypass path utility"""