MCPcopy
hub / github.com/django/django / test_close_only_initialized

Method test_close_only_initialized

tests/cache/tests.py:2050–2063  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2048 self.assertTrue(cache.closed)
2049
2050 def test_close_only_initialized(self):
2051 with self.settings(
2052 CACHES={
2053 "cache_1": {
2054 "BACKEND": "cache.closeable_cache.CacheClass",
2055 },
2056 "cache_2": {
2057 "BACKEND": "cache.closeable_cache.CacheClass",
2058 },
2059 }
2060 ):
2061 self.assertEqual(caches.all(initialized_only=True), [])
2062 signals.request_finished.send(self.__class__)
2063 self.assertEqual(caches.all(initialized_only=True), [])
2064
2065
2066DEFAULT_MEMORY_CACHES_SETTINGS = {

Callers

nothing calls this directly

Calls 3

settingsMethod · 0.45
allMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected