🕷️ 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
test: Updating old httpx tests for curl_cffi
Karim shoairaf643e4c0149
diff --git a/tests/fetchers/async/test_httpx.py b/tests/fetchers/async/test_requests.pysimilarity index 92%rename from tests/fetchers/async/test_httpx.pyrename to tests/fetchers/async/test_requests.pyindex 465d7fd..29f7154 100644--- a/tests/fetchers/async/test_httpx.py+++ b/tests/fetchers/async/test_requests.py@@ -33,7 +33,7 @@ class TestAsyncFetcher:assert (await fetcher.get(urls["status_501"])).status == 501async def test_get_properties(self, fetcher, urls):- """Test if different arguments with GET request breaks the code or not"""+ """Test if different arguments with the GET request break the code or not"""assert (await fetcher.get(urls["status_200"], stealthy_headers=True)).status == 200@@ -51,7 +51,7 @@ class TestAsyncFetcher:).status == 200async def test_post_properties(self, fetcher, urls):- """Test if different arguments with POST request breaks the code or not"""+ """Test if different arguments with the POST request break the code or not"""assert (await fetcher.post(urls["post_url"], data={"key": "value"})).status == 200@@ -79,7 +79,7 @@ class TestAsyncFetcher:).status == 200async def test_put_properties(self, fetcher, urls):- """Test if different arguments with PUT request breaks the code or not"""+ """Test if different arguments with a PUT request break the code or not"""assert (await fetcher.put(urls["put_url"], data={"key": "value"})).status in [200,405,@@ -108,7 +108,7 @@ class TestAsyncFetcher:).status in [200, 405]async def test_delete_properties(self, fetcher, urls):- """Test if different arguments with DELETE request breaks the code or not"""+ """Test if different arguments with the DELETE request break the code or not"""assert (await fetcher.delete(urls["delete_url"], stealthy_headers=True)).status == 200diff --git a/tests/fetchers/sync/test_httpx.py b/tests/fetchers/sync/test_requests.pysimilarity index 92%rename from tests/fetchers/sync/test_httpx.pyrename to tests/fetchers/sync/test_requests.pyindex d90eda1..2a3c52d 100644--- a/tests/fetchers/sync/test_httpx.py+++ b/tests/fetchers/sync/test_requests.py@@ -32,7 +32,7 @@ class TestFetcher:assert fetcher.get(self.status_501).status == 501def test_get_properties(self, fetcher):- """Test if different arguments with GET request breaks the code or not"""+ """Test if different arguments with the GET request break the code or not"""assert fetcher.get(self.status_200, stealthy_headers=True).status == 200assert fetcher.get(self.status_200, follow_redirects=True).status == 200assert fetcher.get(self.status_200, timeout=None).status == 200@@ -47,7 +47,7 @@ class TestFetcher:)def test_post_properties(self, fetcher):- """Test if different arguments with POST request breaks the code or not"""+ """Test if different arguments with the POST request break the code or not"""assert fetcher.post(self.post_url, data={"key": "value"}).status == 200assert (fetcher.post(@@ -77,7 +77,7 @@ class TestFetcher:)def test_put_properties(self, fetcher):- """Test if different arguments with PUT request breaks the code or not"""+ """Test if different arguments with a PUT request break the code or not"""assert fetcher.put(self.put_url, data={"key": "value"}).status == 200assert (fetcher.put(@@ -106,7 +106,7 @@ class TestFetcher:)def test_delete_properties(self, fetcher):- """Test if different arguments with DELETE request breaks the code or not"""+ """Test if different arguments with the DELETE request break the code or not"""assert fetcher.delete(self.delete_url, stealthy_headers=True).status == 200assert fetcher.delete(self.delete_url, follow_redirects=True).status == 200assert fetcher.delete(self.delete_url, timeout=None).status == 200