MCPcopy Create free account
hub / github.com/psf/cachecontrol / test_stream_is_cached

Method test_stream_is_cached

tests/test_chunked_response.py:41–50  ·  view source on GitHub ↗
(self, url, sess)

Source from the content-addressed store, hash-verified

39 assert r.from_cache is True
40
41 def test_stream_is_cached(self, url, sess):
42 resp_1 = sess.get(url + "stream")
43 content_1 = resp_1.content
44
45 resp_2 = sess.get(url + "stream")
46 content_2 = resp_1.content
47
48 assert not resp_1.from_cache
49 assert resp_2.from_cache
50 assert content_1 == content_2
51
52 def test_stream_is_not_cached_when_content_is_not_read(self, url, sess):
53 sess.get(url + "stream", stream=True)

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected