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

test: Adjusting tests with the correct timeout

Karim shoair560ae9528192
diff --git a/tests/fetchers/async/test_camoufox.py b/tests/fetchers/async/test_camoufox.py
index 0041e14..ff33f0a 100644
--- a/tests/fetchers/async/test_camoufox.py
+++ b/tests/fetchers/async/test_camoufox.py
@@ -106,5 +106,5 @@ class TestStealthyFetcher:
async def test_infinite_timeout(self, fetcher, urls):
"""Test if infinite timeout breaks the code or not"""
assert (
- await fetcher.async_fetch(urls["delayed_url"], timeout=None)
+ await fetcher.async_fetch(urls["delayed_url"], timeout=0)
).status == 200
diff --git a/tests/fetchers/sync/test_camoufox.py b/tests/fetchers/sync/test_camoufox.py
index 02413eb..37a2e85 100644
--- a/tests/fetchers/sync/test_camoufox.py
+++ b/tests/fetchers/sync/test_camoufox.py
@@ -89,4 +89,4 @@ class TestStealthyFetcher:
def test_infinite_timeout(self, fetcher):
"""Test if infinite timeout breaks the code or not"""
- assert fetcher.fetch(self.delayed_url, timeout=None).status == 200
+ assert fetcher.fetch(self.delayed_url, timeout=0).status == 200