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

Method sess

tests/test_storage_filecache.py:32–39  ·  view source on GitHub ↗
(self, url, tmpdir)

Source from the content-addressed store, hash-verified

30
31 @pytest.fixture()
32 def sess(self, url, tmpdir):
33 self.url = url
34 self.cache = self.FileCacheClass(str(tmpdir))
35 sess = CacheControl(requests.Session(), cache=self.cache)
36 yield sess
37
38 # closing session object
39 sess.close()
40
41 def test_filecache_from_cache(self, sess):
42 response = sess.get(self.url)

Callers

nothing calls this directly

Calls 2

CacheControlFunction · 0.90
closeMethod · 0.45

Tested by

no test coverage detected