summaryrefslogtreecommitdiff
path: root/tests/cache
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2020-12-08 07:05:49 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-12-08 08:54:50 +0100
commit30f2d1af03b1f1e981e8e15151079795914f8f2c (patch)
tree2e3c6dda051d8b8562f259352bf82aeaacb34dd9 /tests/cache
parent148702e7258eafb27d5488b33a723c87d898e22b (diff)
downloaddjango-30f2d1af03b1f1e981e8e15151079795914f8f2c.tar.gz
Refs #32233 -- Added tests for nonexistent cache and databases aliases.
Diffstat (limited to 'tests/cache')
-rw-r--r--tests/cache/tests.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/cache/tests.py b/tests/cache/tests.py
index 367d2d7119..dd4d441ad1 100644
--- a/tests/cache/tests.py
+++ b/tests/cache/tests.py
@@ -2499,3 +2499,8 @@ class CacheHandlerTest(SimpleTestCase):
t.join()
self.assertIsNot(c[0], c[1])
+
+ def test_nonexistent_alias(self):
+ msg = "Could not find config for 'nonexistent' in settings.CACHES"
+ with self.assertRaisesMessage(InvalidCacheBackendError, msg):
+ caches['nonexistent']