def test_clean_key_random_hash(self):
     assert CacheOp.clean_key('abc123abc123abc123abc123abc12345') == '#'
 def test_clean_key_session_key_cached_db_backend(self):
     key = ('django.contrib.sessions.cached_db' +
            'abcdefghijklmnopqrstuvwxyz012345')
     assert CacheOp.clean_key(key) == 'django.contrib.sessions.cached_db#'
 def test_clean_key_uuid(self):
     assert CacheOp.clean_key('bdfc9986-d461-4a5e-bf98-8688993abcfb') == '#'
 def test_clean_key_integer(self):
     assert CacheOp.clean_key('foo1') == 'foo#'
示例#5
0
 def test_clean_key_session_key_cache_backend(self):
     key = "django.contrib.sessions.cacheabcdefghijklmnopqrstuvwxyz012345"
     assert CacheOp.clean_key(key) == "django.contrib.sessions.cache#"
示例#6
0
 def test_clean_key_random_hash(self):
     assert CacheOp.clean_key("abc123abc123abc123abc123abc12345") == "#"
示例#7
0
 def test_clean_key_integer(self):
     assert CacheOp.clean_key("foo1") == "foo#"