MCPcopy Create free account
hub / github.com/celery/celery / DictBackend

Class DictBackend

t/unit/backends/test_base.py:504–520  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

502
503
504class DictBackend(BaseBackend):
505
506 def __init__(self, *args, **kwargs):
507 super().__init__(*args, **kwargs)
508 self._data = {'can-delete': {'result': 'foo'}}
509
510 def _restore_group(self, group_id):
511 if group_id == 'exists':
512 return {'result': 'group'}
513
514 def _get_task_meta_for(self, task_id):
515 if task_id == 'task-exists':
516 return {'result': 'task'}
517 return {'status': states.PENDING, 'result': None}
518
519 def _delete_group(self, group_id):
520 self._data.pop(group_id, None)
521
522
523class test_BaseBackend_dict:

Calls

no outgoing calls