summaryrefslogtreecommitdiff
path: root/tests/cache
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cache')
-rw-r--r--tests/cache/tests.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/cache/tests.py b/tests/cache/tests.py
index 1ef2cc1bc1..2a3bf57354 100644
--- a/tests/cache/tests.py
+++ b/tests/cache/tests.py
@@ -440,15 +440,15 @@ class BaseCacheTests:
def test_touch(self):
# cache.touch() updates the timeout.
cache.set('expire1', 'very quickly', timeout=1)
- self.assertIs(cache.touch('expire1', timeout=4), True)
- time.sleep(2)
+ self.assertIs(cache.touch('expire1', timeout=2), True)
+ time.sleep(1.0)
self.assertIs(cache.has_key('expire1'), True)
- time.sleep(3)
+ time.sleep(1.5)
self.assertIs(cache.has_key('expire1'), False)
# cache.touch() works without the timeout argument.
cache.set('expire1', 'very quickly', timeout=1)
self.assertIs(cache.touch('expire1'), True)
- time.sleep(2)
+ time.sleep(1.5)
self.assertIs(cache.has_key('expire1'), True)
self.assertIs(cache.touch('nonexistent'), False)