MCPcopy
hub / github.com/celery/celery / test_is_pickled

Method test_is_pickled

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

Source from the content-addressed store, hash-verified

303 assert tb.get_result(tid) == 42
304
305 def test_is_pickled(self):
306 tb = DatabaseBackend(self.uri, app=self.app)
307
308 tid2 = uuid()
309 result = {'foo': 'baz', 'bar': SomeClass(12345)}
310 tb.mark_as_done(tid2, result)
311 # is serialized properly.
312 rindb = tb.get_result(tid2)
313 assert rindb.get('foo') == 'baz'
314 assert rindb.get('bar').data == 12345
315
316 def test_mark_as_started(self):
317 tb = DatabaseBackend(self.uri, app=self.app)

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