mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
BaseCache now has a no-op close method as per ticket #18582
Also removed the hasattr check when firing request_finished signal for caches with a 'close' method. Should be safe to call `cache.close` everywhere now
This commit is contained in:
4
tests/regressiontests/cache/tests.py
vendored
4
tests/regressiontests/cache/tests.py
vendored
@@ -266,6 +266,10 @@ class BaseCacheTests(object):
|
||||
self.assertEqual(self.cache.get('answer'), 32)
|
||||
self.assertRaises(ValueError, self.cache.decr, 'does_not_exist')
|
||||
|
||||
def test_close(self):
|
||||
self.assertTrue(hasattr(self.cache, 'close'))
|
||||
self.cache.close()
|
||||
|
||||
def test_data_types(self):
|
||||
# Many different data types can be cached
|
||||
stuff = {
|
||||
|
||||
Reference in New Issue
Block a user