MCPcopy
hub / github.com/celery/celery / test_memcache_bytes_key

Method test_memcache_bytes_key

t/unit/backends/test_cache.py:256–264  ·  view source on GitHub ↗
(self, mask_modules)

Source from the content-addressed store, hash-verified

254
255 @pytest.mark.masked_modules('pylibmc')
256 def test_memcache_bytes_key(self, mask_modules):
257 with self.mock_memcache():
258 with conftest.reset_modules('celery.backends.cache'):
259 from celery.backends import cache
260 cache._imp = [None]
261 task_id, result = str_to_bytes(uuid()), 42
262 b = cache.CacheBackend(backend='memcache', app=self.app)
263 b.store_result(task_id, result, state=states.SUCCESS)
264 assert b.get_result(task_id) == result
265
266 def test_pylibmc_unicode_key(self):
267 with conftest.reset_modules('celery.backends.cache'):

Callers

nothing calls this directly

Calls 3

mock_memcacheMethod · 0.80
get_resultMethod · 0.80
store_resultMethod · 0.45

Tested by

no test coverage detected