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

Method test_is_pickled

t/unit/backends/test_database.py:548–557  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

546 assert tb.get_result(tid) == 42
547
548 def test_is_pickled(self):
549 tb = DatabaseBackend(self.uri, app=self.app)
550
551 tid2 = uuid()
552 result = {'foo': 'baz', 'bar': SomeClass(12345)}
553 tb.mark_as_done(tid2, result)
554 # is serialized properly.
555 rindb = tb.get_result(tid2)
556 assert rindb.get('foo') == 'baz'
557 assert rindb.get('bar').data == 12345
558
559 def test_result_respects_configured_serializer(self):
560 """Regression test for celery/celery#3025.

Callers

nothing calls this directly

Calls 5

DatabaseBackendClass · 0.90
mark_as_doneMethod · 0.80
get_resultMethod · 0.80
SomeClassClass · 0.70
getMethod · 0.45

Tested by

no test coverage detected