mirror of
https://github.com/django/django.git
synced 2025-09-26 20:19:16 +00:00
Fixed #16533 -- Stopped the memcache cache backend from raising an exception if the timeout value isn't an integer. Thanks, Jeff Balogh.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16556 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
4f50d248a8
commit
db594f90ba
2 changed files with 6 additions and 1 deletions
5
tests/regressiontests/cache/tests.py
vendored
5
tests/regressiontests/cache/tests.py
vendored
|
@ -408,6 +408,11 @@ class BaseCacheTests(object):
|
|||
self.assertEqual(self.cache.get('key3'), 'sausage')
|
||||
self.assertEqual(self.cache.get('key4'), 'lobster bisque')
|
||||
|
||||
def test_float_timeout(self):
|
||||
# Make sure a timeout given as a float doesn't crash anything.
|
||||
self.cache.set("key1", "spam", 100.2)
|
||||
self.assertEqual(self.cache.get("key1"), "spam")
|
||||
|
||||
def perform_cull_test(self, initial_count, final_count):
|
||||
"""This is implemented as a utility method, because only some of the backends
|
||||
implement culling. The culling algorithm also varies slightly, so the final
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue