MCPcopy Index your code
hub / github.com/apify/crawlee-python / __init__

Method __init__

tests/unit/test_router.py:15–27  ·  view source on GitHub ↗
(self, *, label: str | None)

Source from the content-addressed store, hash-verified

13
14class MockContext(BasicCrawlingContext):
15 def __init__(self, *, label: str | None) -> None:
16 super().__init__(
17 request=Request.from_url(url='https://example.com/', user_data={'label': label}),
18 session=Session(),
19 send_request=AsyncMock(),
20 add_requests=AsyncMock(),
21 proxy_info=AsyncMock(),
22 push_data=AsyncMock(),
23 use_state=AsyncMock(),
24 get_key_value_store=AsyncMock(),
25 log=logging.getLogger(),
26 register_deferred_cleanup=lambda _: None,
27 )
28
29
30async def test_router_no_handlers() -> None:

Callers

nothing calls this directly

Calls 2

SessionClass · 0.90
from_urlMethod · 0.80

Tested by

no test coverage detected