MCPcopy
hub / github.com/celery/celery / test_memcache_unicode_key

Method test_memcache_unicode_key

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

Source from the content-addressed store, hash-verified

243
244 @pytest.mark.masked_modules('pylibmc')
245 def test_memcache_unicode_key(self, mask_modules):
246 with self.mock_memcache():
247 with conftest.reset_modules('celery.backends.cache'):
248 from celery.backends import cache
249 cache._imp = [None]
250 task_id, result = str(uuid()), 42
251 b = cache.CacheBackend(backend='memcache', app=self.app)
252 b.store_result(task_id, result, state=states.SUCCESS)
253 assert b.get_result(task_id) == result
254
255 @pytest.mark.masked_modules('pylibmc')
256 def test_memcache_bytes_key(self, mask_modules):

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