MCPcopy
hub / github.com/celery/celery / set

Method set

t/unit/backends/test_cache.py:162–169  ·  view source on GitHub ↗
(self, key, value, *args, **kwargs)

Source from the content-addressed store, hash-verified

160class MemcachedClient(DummyClient):
161
162 def set(self, key, value, *args, **kwargs):
163 key_t, must_be, not_be, cod = bytes, 'string', 'bytes', 'decode'
164
165 if isinstance(key, key_t):
166 raise MyMemcachedStringEncodingError(
167 f'Keys must be {must_be}, not {not_be}. Convert your '
168 f'strings using mystring.{cod}(charset)!')
169 return super().set(key, value, *args, **kwargs)
170
171
172class MockCacheMixin:

Callers 1

Calls 1

Tested by

no test coverage detected