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

Method test_close

tests/test_adapter.py:65–71  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

63 assert not r2.from_cache
64
65 def test_close(self):
66 cache = mock.Mock(spec=DictCache)
67 sess = Session()
68 sess.mount("http://", CacheControlAdapter(cache))
69
70 sess.close()
71 assert cache.close.called
72
73 def test_do_not_leak_response(self, url, sess):
74 resp = sess.get(url + "stream", stream=True)

Callers

nothing calls this directly

Calls 2

CacheControlAdapterClass · 0.90
closeMethod · 0.45

Tested by

no test coverage detected