MCPcopy
hub / github.com/django/django / test_clear_cache

Method test_clear_cache

tests/apps/tests.py:209–217  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

207
208 @override_settings(INSTALLED_APPS=SOME_INSTALLED_APPS)
209 def test_clear_cache(self):
210 # Set cache.
211 self.assertIsNone(apps.get_swappable_settings_name("admin.LogEntry"))
212 apps.get_models()
213
214 apps.clear_cache()
215
216 self.assertEqual(apps.get_swappable_settings_name.cache_info().currsize, 0)
217 self.assertEqual(apps.get_models.cache_info().currsize, 0)
218
219 @override_settings(INSTALLED_APPS=SOME_INSTALLED_APPS)
220 def test_cached_properties_cleared_after_cache_clear(self):

Callers

nothing calls this directly

Calls 3

get_modelsMethod · 0.45
clear_cacheMethod · 0.45

Tested by

no test coverage detected