MCPcopy
hub / github.com/celery/celery / test_add_discard

Method test_add_discard

t/unit/tasks/test_result.py:582–591  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

580 yield
581
582 def test_add_discard(self):
583 x = self.app.ResultSet([])
584 x.add(self.app.AsyncResult('1'))
585 assert self.app.AsyncResult('1') in x.results
586 x.discard(self.app.AsyncResult('1'))
587 x.discard(self.app.AsyncResult('1'))
588 x.discard('1')
589 assert self.app.AsyncResult('1') not in x.results
590
591 x.update([self.app.AsyncResult('2')])
592
593 def test_clear(self):
594 x = self.app.ResultSet([])

Callers

nothing calls this directly

Calls 5

addMethod · 0.95
discardMethod · 0.95
updateMethod · 0.95
ResultSetMethod · 0.80
AsyncResultMethod · 0.45

Tested by

no test coverage detected