#NEWLINE# def test_has_failed_checks_status_on_first_call_and_returns_correct_value( self ) : #NEWLINE# #INDENT# self . conn . send_get_request . return_value = self . status_with ( { #NEWLINE# #INDENT# 'finished' : True , #NEWLINE# 'failed' : True , #NEWLINE# #UNINDENT# } ) #NEWLINE# r = Resource ( 'ID' , self . conn ) #NEWLINE# failed = r . has_failed ( ) #NEWLINE# self . assertTrue ( failed ) #NEWLINE# self . conn . send_get_request . assert_called_once_with ( '/ID/status' )