#NEWLINE# def test_from_dict( self ) : #NEWLINE# #INDENT# 'Ensure from_dict returns the correct Async object.' #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# 'headers' : headers , #NEWLINE# 'task_args' : task_args , #NEWLINE# #UNINDENT# } #NEWLINE# async_job = Async . from_dict ( options ) #NEWLINE# self . assertEqual ( headers , async_job . get_headers ( ) ) #NEWLINE# self . assertEqual ( task_args , async_job . get_task_args ( ) ) #NEWLINE# self . assertEqual ( job [ 0 ] , async_job . _function_path ) #NEWLINE# self . assertEqual ( job [ 0 ] , async_job . function_path )