Permalink
Browse files

Load the backend with get_cache

  • Loading branch information...
1 parent 2da18ed commit 1dc7383a2f51c225f0138792eff6d35dc35dac8c @edavis committed Nov 12, 2012
Showing with 4 additions and 5 deletions.
  1. +4 −5 infinite_memcached/tests.py
@@ -1,13 +1,12 @@
import time
from django.test import TestCase
-from infinite_memcached.cache import MemcachedCache
+from django.core.cache import get_cache
class InfiniteMemcached(TestCase):
def test_handle_timeouts(self):
- mc = MemcachedCache(
- server="127.0.0.1:11211",
- params={},
- )
+ mc = get_cache('infinite_memcached.cache.MemcachedCache',
+ LOCATION='127.0.0.1:11211')
+
self.assertEqual(0, mc._get_memcache_timeout(0))
self.assertEqual(60, mc._get_memcache_timeout(60))
self.assertEqual(300, mc._get_memcache_timeout(None))

0 comments on commit 1dc7383

Please sign in to comment.