#NEWLINE# def test_waits_until_archive_is_generated( self ) : #NEWLINE# #INDENT# self . conn . send_get_request . side_effect = [ self . status_with ( { #NEWLINE# #INDENT# 'archive' : { #NEWLINE# #INDENT# 'generated' : False , #NEWLINE# 'failed' : False , #NEWLINE# 'error' : None , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) , self . status_with ( { #NEWLINE# #INDENT# 'archive' : { #NEWLINE# #INDENT# 'generated' : True , #NEWLINE# 'failed' : False , #NEWLINE# 'error' : None , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) ] #NEWLINE# d = Decompilation ( 'ID' , self . conn ) #NEWLINE# d . wait_until_archive_is_generated ( ) #NEWLINE# self . assertEqual ( len ( self . conn . send_get_request . mock_calls ) , 2 )