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

Method test_proxy

impit-python/test/async_client_test.py:349–358  ·  view source on GitHub ↗
(self, browser: Browser)

Source from the content-addressed store, hash-verified

347
348 @pytest.mark.asyncio
349 async def test_proxy(self, browser: Browser) -> None:
350 stop_proxy = start_proxy_server(3002)
351 impit = AsyncClient(browser=browser, proxy='http://127.0.0.1:3002')
352 target_url = 'https://crawlee.dev/'
353
354 resp = await impit.get(target_url)
355 assert resp.status_code == 200
356 assert 'Crawlee' in resp.text
357
358 stop_proxy()
359
360 @pytest.mark.asyncio
361 async def test_default_no_redirect(self, browser: Browser) -> None:

Callers

nothing calls this directly

Calls 3

getMethod · 0.95
AsyncClientClass · 0.90
start_proxy_serverFunction · 0.85

Tested by

no test coverage detected