MCPcopy Index your code
hub / github.com/django/django / test_all

Method test_all

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

Source from the content-addressed store, hash-verified

3090 test_caches["invalid_backend"]
3091
3092 def test_all(self):
3093 test_caches = CacheHandler(
3094 {
3095 "cache_1": {
3096 "BACKEND": "django.core.cache.backends.dummy.DummyCache",
3097 },
3098 "cache_2": {
3099 "BACKEND": "django.core.cache.backends.dummy.DummyCache",
3100 },
3101 }
3102 )
3103 self.assertEqual(test_caches.all(initialized_only=True), [])
3104 cache_1 = test_caches["cache_1"]
3105 self.assertEqual(test_caches.all(initialized_only=True), [cache_1])
3106 self.assertEqual(len(test_caches.all()), 2)
3107 # .all() initializes all caches.
3108 self.assertEqual(len(test_caches.all(initialized_only=True)), 2)
3109 self.assertEqual(test_caches.all(), test_caches.all(initialized_only=True))

Callers

nothing calls this directly

Calls 2

CacheHandlerClass · 0.90
allMethod · 0.45

Tested by

no test coverage detected