diff --git a/django/core/cache/backends/memcached.py b/django/core/cache/backends/memcached.py
index e452498..e32fce9 100644
a
|
b
|
class BaseMemcachedCache(BaseCache):
|
47 | 47 | # |
48 | 48 | # This means that we have to switch to absolute timestamps. |
49 | 49 | timeout += int(time.time()) |
50 | | return timeout |
| 50 | return int(timeout) |
51 | 51 | |
52 | 52 | def add(self, key, value, timeout=0, version=None): |
53 | 53 | key = self.make_key(key, version=version) |
diff --git a/tests/regressiontests/cache/tests.py b/tests/regressiontests/cache/tests.py
index c5349d5..1ab5286 100644
a
|
b
|
class BaseCacheTests(object):
|
408 | 408 | self.assertEqual(self.cache.get('key3'), 'sausage') |
409 | 409 | self.assertEqual(self.cache.get('key4'), 'lobster bisque') |
410 | 410 | |
| 411 | def test_float_timeout(self): |
| 412 | # Make sure a timeout given as a float doesn't crash anything. |
| 413 | self.cache.set("key1", "spam", 100.2) |
| 414 | self.assertEqual(self.cache.get("key1"), "spam") |
| 415 | |
411 | 416 | def perform_cull_test(self, initial_count, final_count): |
412 | 417 | """This is implemented as a utility method, because only some of the backends |
413 | 418 | implement culling. The culling algorithm also varies slightly, so the final |