#NEWLINE# def test_setting_result_calls_persist( self ) : #NEWLINE# #INDENT# 'Ensure setting the result calls the persist_result method.' #NEWLINE# from furious.async import Async #NEWLINE# result = 'here be the results.' #NEWLINE# persistence_engine = mock . Mock ( ) #NEWLINE# job = Async ( target = dir , persist_result = True ) #NEWLINE# job . _persistence_engine = persistence_engine #NEWLINE# job . executing = True #NEWLINE# job . result = result #NEWLINE# persistence_engine . store_async_result . assert_called_once_with ( job . id , result )