#NEWLINE# def test_reconstitution( self ) : #NEWLINE# #INDENT# 'Ensure to_dict(job.from_dict()) returns the same thing.' #NEWLINE# from furious.async import Async #NEWLINE# headers = { #NEWLINE# #INDENT# 'some' : 'thing' , #NEWLINE# 'fun' : 1 , #NEWLINE# #UNINDENT# } #NEWLINE# job = ( 'test' , None , None ) #NEWLINE# task_args = { #NEWLINE# #INDENT# 'other' : 'zzz' , #NEWLINE# 'nested' : 1 , #NEWLINE# #UNINDENT# } #NEWLINE# options = { #NEWLINE# #INDENT# 'job' : job , #NEWLINE# 'id' : 'someid' , #NEWLINE# 'headers' : task_args , #NEWLINE# 'task_args' : task_args , #NEWLINE# 'persistence_engine' : 'furious.extras.appengine.ndb_persistence' , #NEWLINE# '_recursion' : { #NEWLINE# #INDENT# 'current' : 1 , #NEWLINE# 'max' : 100 , #NEWLINE# #UNINDENT# } , #NEWLINE# '_type' : 'furious.async.Async' , #NEWLINE# 'context_id' : None , #NEWLINE# 'parent_id' : 'parentid' , #NEWLINE# #UNINDENT# } #NEWLINE# async_job = Async . from_dict ( options ) #NEWLINE# self . assertEqual ( options , async_job . to_dict ( ) )