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

Function test_drop_clears_all

tests/unit/test_throttling_request_manager.py:494–504  ·  view source on GitHub ↗

drop should clear inner and all sub-managers.

(
    manager: ThrottlingRequestManager[RequestQueue],
)

Source from the content-addressed store, hash-verified

492
493
494async def test_drop_clears_all(
495 manager: ThrottlingRequestManager[RequestQueue],
496) -> None:
497 """drop should clear inner and all sub-managers."""
498 await manager.add_request(f'https://{THROTTLED_DOMAIN}/page1')
499
500 assert THROTTLED_DOMAIN in manager._sub_managers
501
502 await manager.drop()
503
504 assert len(manager._sub_managers) == 0
505
506
507async def test_purge_clears_requests_and_resets_throttle_state(

Callers

nothing calls this directly

Calls 2

add_requestMethod · 0.45
dropMethod · 0.45

Tested by

no test coverage detected