diff options
| author | Adam Johnson <me@adamj.eu> | 2020-03-21 19:14:02 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-21 20:14:02 +0100 |
| commit | ffde4d5da88da6ed40ffc090503896d329bc67f8 (patch) | |
| tree | 5411afaad55fcb78cd46a77f1ba048765e907262 /tests/check_framework/test_caches.py | |
| parent | 2117b7c12e555de48f452a4610a21a6f8c77a02b (diff) | |
Normalized check framework test pattern.
Diffstat (limited to 'tests/check_framework/test_caches.py')
| -rw-r--r-- | tests/check_framework/test_caches.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/tests/check_framework/test_caches.py b/tests/check_framework/test_caches.py index ab16c6071c..ed21e4710a 100644 --- a/tests/check_framework/test_caches.py +++ b/tests/check_framework/test_caches.py @@ -1,4 +1,4 @@ -from django.core.checks.caches import E001 +from django.core.checks.caches import E001, check_default_cache_is_configured from django.test import SimpleTestCase from django.test.utils import override_settings @@ -15,21 +15,16 @@ class CheckCacheSettingsAppDirsTest(SimpleTestCase): }, } - @property - def func(self): - from django.core.checks.caches import check_default_cache_is_configured - return check_default_cache_is_configured - @override_settings(CACHES=VALID_CACHES_CONFIGURATION) def test_default_cache_included(self): """ Don't error if 'default' is present in CACHES setting. """ - self.assertEqual(self.func(None), []) + self.assertEqual(check_default_cache_is_configured(None), []) @override_settings(CACHES=INVALID_CACHES_CONFIGURATION) def test_default_cache_not_included(self): """ Error if 'default' not present in CACHES setting. """ - self.assertEqual(self.func(None), [E001]) + self.assertEqual(check_default_cache_is_configured(None), [E001]) |
