summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMalcolm Box <malcolm@tellybug.com>2014-05-09 11:23:28 +0100
committerClaude Paroz <claude@2xlibre.net>2014-05-09 18:35:07 +0200
commit66880e4cd128ea81ae53ac6f292f00c563521009 (patch)
tree6275f547130f6d5be0b82ad8477ed6eba1c1511e /tests
parentfdbd29dd27d617f7275a1a106a2934c7f8df04c7 (diff)
Fixed #22606 -- Locmemcache has_key() failed for infinite cache expiry
Refactored cache expiry logic for Locmemcache to make consistent across all places where accessed, and correctly handle None as expiry time.
Diffstat (limited to 'tests')
-rw-r--r--tests/cache/tests.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/cache/tests.py b/tests/cache/tests.py
index 8dbdb33ca9..6e0f755477 100644
--- a/tests/cache/tests.py
+++ b/tests/cache/tests.py
@@ -285,6 +285,8 @@ class BaseCacheTests(object):
cache.set("hello1", "goodbye1")
self.assertEqual(cache.has_key("hello1"), True)
self.assertEqual(cache.has_key("goodbye1"), False)
+ cache.set("no_expiry", "here", None)
+ self.assertEqual(cache.has_key("no_expiry"), True)
def test_in(self):
# The in operator can be used to inspect cache contents