MCPcopy Create free account
hub / github.com/apify/crawlee-python / session

Function session

tests/unit/sessions/test_session.py:12–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10
11@pytest.fixture
12def session() -> Session:
13 return Session(
14 id='test_session',
15 max_age=timedelta(minutes=30),
16 user_data={'user_key': 'user_value'},
17 max_error_score=3.0,
18 error_score_decrement=0.5,
19 created_at=datetime.now(timezone.utc),
20 usage_count=0,
21 max_usage_count=10,
22 error_score=0.0,
23 cookies={'cookie_key': 'cookie_value'},
24 blocked_status_codes=[401, 403, 429],
25 )
26
27
28def test_session_init(session: Session) -> None:

Callers

nothing calls this directly

Calls 1

SessionClass · 0.90

Tested by

no test coverage detected