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

Method test_two_read_calls

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

Source from the content-addressed store, hash-verified

610 response.read()
611
612 async def test_two_read_calls(self, browser: Browser) -> None:
613 impit = AsyncClient(browser=browser)
614
615 async with impit.stream('GET', get_httpbin_url('/')) as response:
616 assert response.status_code == 200
617
618 content = response.read()
619 assert isinstance(content, bytes)
620 assert content == response.content
621
622 # Return content from cache
623 assert response.read() == response.content
624
625 async def test_two_iter_bytes_calls(self, browser: Browser) -> None:
626 impit = AsyncClient(browser=browser)

Callers

nothing calls this directly

Calls 4

streamMethod · 0.95
AsyncClientClass · 0.90
get_httpbin_urlFunction · 0.85
readMethod · 0.80

Tested by

no test coverage detected