diff options
| author | Jannis Leidel <jannis@leidel.info> | 2011-07-29 09:39:23 +0000 |
|---|---|---|
| committer | Jannis Leidel <jannis@leidel.info> | 2011-07-29 09:39:23 +0000 |
| commit | db594f90ba684f45bfc8033fb190afdf567ad9f0 (patch) | |
| tree | ecd47273bb0ee8199f24e44aa9cd338d5774177d /tests | |
| parent | 4f50d248a888f04f3ba93b04aaf40aa65a7d5fee (diff) | |
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
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/cache/tests.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/regressiontests/cache/tests.py b/tests/regressiontests/cache/tests.py index afb5a15b41..6a5201ffeb 100644 --- a/tests/regressiontests/cache/tests.py +++ b/tests/regressiontests/cache/tests.py @@ -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 |
