MCPcopy Create free account
hub / github.com/apify/impit / test_ja4_fingerprint

Function test_ja4_fingerprint

impit-python/test/basic_client_test.py:68–78  ·  view source on GitHub ↗
(browser: Literal['chrome', 'firefox'] | None, ja4: str)

Source from the content-addressed store, hash-verified

66 ],
67)
68def test_ja4_fingerprint(browser: Literal['chrome', 'firefox'] | None, ja4: str) -> None:
69 impit = Client(browser=browser)
70 response = impit.get('https://headers.superuser.one/')
71 assert response.status_code == 200
72 found_ja4 = False
73 for line in response.text.split('\n'):
74 if line.startswith('cf-ja4 => '):
75 assert line == f'cf-ja4 => {ja4}'
76 found_ja4 = True
77 break
78 assert found_ja4, "Expected 'cf-ja4' header line not found in response"
79
80
81@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 2

getMethod · 0.95
ClientClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…