test: Update tests to use current configuration
This commit is contained in:
@@ -3,13 +3,15 @@ import pytest_httpbin
|
|||||||
|
|
||||||
from scrapling import StealthyFetcher
|
from scrapling import StealthyFetcher
|
||||||
|
|
||||||
|
StealthyFetcher.auto_match = True
|
||||||
|
|
||||||
|
|
||||||
@pytest_httpbin.use_class_based_httpbin
|
@pytest_httpbin.use_class_based_httpbin
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
class TestStealthyFetcher:
|
class TestStealthyFetcher:
|
||||||
@pytest.fixture(scope="class")
|
@pytest.fixture(scope="class")
|
||||||
def fetcher(self):
|
def fetcher(self):
|
||||||
return StealthyFetcher(auto_match=False)
|
return StealthyFetcher
|
||||||
|
|
||||||
@pytest.fixture(scope="class")
|
@pytest.fixture(scope="class")
|
||||||
def urls(self, httpbin):
|
def urls(self, httpbin):
|
||||||
|
|||||||
@@ -3,13 +3,15 @@ import pytest_httpbin
|
|||||||
|
|
||||||
from scrapling.fetchers import AsyncFetcher
|
from scrapling.fetchers import AsyncFetcher
|
||||||
|
|
||||||
|
AsyncFetcher.auto_match = True
|
||||||
|
|
||||||
|
|
||||||
@pytest_httpbin.use_class_based_httpbin
|
@pytest_httpbin.use_class_based_httpbin
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
class TestAsyncFetcher:
|
class TestAsyncFetcher:
|
||||||
@pytest.fixture(scope="class")
|
@pytest.fixture(scope="class")
|
||||||
def fetcher(self):
|
def fetcher(self):
|
||||||
return AsyncFetcher(auto_match=True)
|
return AsyncFetcher
|
||||||
|
|
||||||
@pytest.fixture(scope="class")
|
@pytest.fixture(scope="class")
|
||||||
def urls(self, httpbin):
|
def urls(self, httpbin):
|
||||||
|
|||||||
@@ -3,12 +3,14 @@ import pytest_httpbin
|
|||||||
|
|
||||||
from scrapling import PlayWrightFetcher
|
from scrapling import PlayWrightFetcher
|
||||||
|
|
||||||
|
PlayWrightFetcher.auto_match = True
|
||||||
|
|
||||||
|
|
||||||
@pytest_httpbin.use_class_based_httpbin
|
@pytest_httpbin.use_class_based_httpbin
|
||||||
class TestPlayWrightFetcherAsync:
|
class TestPlayWrightFetcherAsync:
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def fetcher(self):
|
def fetcher(self):
|
||||||
return PlayWrightFetcher(auto_match=False)
|
return PlayWrightFetcher
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def urls(self, httpbin):
|
def urls(self, httpbin):
|
||||||
|
|||||||
@@ -3,13 +3,15 @@ import pytest_httpbin
|
|||||||
|
|
||||||
from scrapling import StealthyFetcher
|
from scrapling import StealthyFetcher
|
||||||
|
|
||||||
|
StealthyFetcher.auto_match = True
|
||||||
|
|
||||||
|
|
||||||
@pytest_httpbin.use_class_based_httpbin
|
@pytest_httpbin.use_class_based_httpbin
|
||||||
class TestStealthyFetcher:
|
class TestStealthyFetcher:
|
||||||
@pytest.fixture(scope="class")
|
@pytest.fixture(scope="class")
|
||||||
def fetcher(self):
|
def fetcher(self):
|
||||||
"""Fixture to create a StealthyFetcher instance for the entire test class"""
|
"""Fixture to create a StealthyFetcher instance for the entire test class"""
|
||||||
return StealthyFetcher(auto_match=False)
|
return StealthyFetcher
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True)
|
||||||
def setup_urls(self, httpbin):
|
def setup_urls(self, httpbin):
|
||||||
|
|||||||
@@ -3,13 +3,15 @@ import pytest_httpbin
|
|||||||
|
|
||||||
from scrapling import Fetcher
|
from scrapling import Fetcher
|
||||||
|
|
||||||
|
Fetcher.auto_match = True
|
||||||
|
|
||||||
|
|
||||||
@pytest_httpbin.use_class_based_httpbin
|
@pytest_httpbin.use_class_based_httpbin
|
||||||
class TestFetcher:
|
class TestFetcher:
|
||||||
@pytest.fixture(scope="class")
|
@pytest.fixture(scope="class")
|
||||||
def fetcher(self):
|
def fetcher(self):
|
||||||
"""Fixture to create a Fetcher instance for the entire test class"""
|
"""Fixture to create a Fetcher instance for the entire test class"""
|
||||||
return Fetcher(auto_match=False)
|
return Fetcher
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True)
|
||||||
def setup_urls(self, httpbin):
|
def setup_urls(self, httpbin):
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ import pytest_httpbin
|
|||||||
|
|
||||||
from scrapling import PlayWrightFetcher
|
from scrapling import PlayWrightFetcher
|
||||||
|
|
||||||
|
PlayWrightFetcher.auto_match = True
|
||||||
|
|
||||||
|
|
||||||
@pytest_httpbin.use_class_based_httpbin
|
@pytest_httpbin.use_class_based_httpbin
|
||||||
class TestPlayWrightFetcher:
|
class TestPlayWrightFetcher:
|
||||||
@@ -10,7 +12,7 @@ class TestPlayWrightFetcher:
|
|||||||
@pytest.fixture(scope="class")
|
@pytest.fixture(scope="class")
|
||||||
def fetcher(self):
|
def fetcher(self):
|
||||||
"""Fixture to create a StealthyFetcher instance for the entire test class"""
|
"""Fixture to create a StealthyFetcher instance for the entire test class"""
|
||||||
return PlayWrightFetcher(auto_match=False)
|
return PlayWrightFetcher
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True)
|
||||||
def setup_urls(self, httpbin):
|
def setup_urls(self, httpbin):
|
||||||
|
|||||||
Reference in New Issue
Block a user