Karim shoair commited on
Commit ·
ccd54cb
1
Parent(s): a185d1b
test: update tests accordingly
Browse files- tests/fetchers/test_utils.py +0 -16
tests/fetchers/test_utils.py
CHANGED
|
@@ -7,7 +7,6 @@ from scrapling.engines.toolbelt.navigation import (
|
|
| 7 |
create_async_intercept_handler,
|
| 8 |
)
|
| 9 |
from scrapling.engines.toolbelt.fingerprints import (
|
| 10 |
-
generate_convincing_referer,
|
| 11 |
get_os_name,
|
| 12 |
generate_headers
|
| 13 |
)
|
|
@@ -204,21 +203,6 @@ class TestConstructProxyDict:
|
|
| 204 |
class TestFingerprintFunctions:
|
| 205 |
"""Test fingerprint generation functions"""
|
| 206 |
|
| 207 |
-
def test_generate_convincing_referer(self):
|
| 208 |
-
"""Test referer generation"""
|
| 209 |
-
url = "https://sub.example.com/page.html"
|
| 210 |
-
result = generate_convincing_referer(url)
|
| 211 |
-
|
| 212 |
-
assert result == "https://www.google.com/"
|
| 213 |
-
|
| 214 |
-
def test_generate_convincing_referer_caching(self):
|
| 215 |
-
"""Test referer generation caching"""
|
| 216 |
-
url = "https://example.com"
|
| 217 |
-
result1 = generate_convincing_referer(url)
|
| 218 |
-
result2 = generate_convincing_referer(url)
|
| 219 |
-
|
| 220 |
-
assert result1 == result2
|
| 221 |
-
|
| 222 |
def test_get_os_name(self):
|
| 223 |
"""Test OS name detection"""
|
| 224 |
result = get_os_name()
|
|
|
|
| 7 |
create_async_intercept_handler,
|
| 8 |
)
|
| 9 |
from scrapling.engines.toolbelt.fingerprints import (
|
|
|
|
| 10 |
get_os_name,
|
| 11 |
generate_headers
|
| 12 |
)
|
|
|
|
| 203 |
class TestFingerprintFunctions:
|
| 204 |
"""Test fingerprint generation functions"""
|
| 205 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 206 |
def test_get_os_name(self):
|
| 207 |
"""Test OS name detection"""
|
| 208 |
result = get_os_name()
|