class_docstr: Test class for the BoxApp
docstr: BoxApp - Gather Logs, Timeout Retry and Succeed
docstr_tok: ["BoxApp","-","Gather","Logs",",","Timeout","Retry","and","Succeed"]
code: def test_gather_logs_requests_timeout_retry_success(self, log_mock):
      """BoxApp - Gather Logs, Timeout Retry and Succeed"""
      with patch.object(self._app, "_client") as client_mock:
          # client_mock.make_request.return_value.json.return_value = None
          client_mock.make_request.side_effect = [
              requests.exceptions.Timeout(
                  response="request timed out once"
              ),
              requests.exceptions.Timeout(
                  response="request timed out twice"
              ),
              Mock(json=Mock(return_value=self._get_sample_payload(1))),
          ]
          assert_equal(bool(self._app._gather_logs()), True)
          log_mock.assert_has_calls(
              [
                  call(
                      "Attempting new request with timeout: %0.2f seconds",
                      6.10,
                  ),
                  call(
                      "Attempting new request with timeout: %0.2f seconds",
                      12.20,
                  ),
              ]
          )
  
imports: import json
  import os
  from boxsdk.exception import BoxException
  from mock import call, Mock, mock_open, patch
  from moto import mock_ssm
  from nose.tools import assert_equal, assert_false, assert_count_equal, assert_true
  import requests
  from streamalert.apps._apps.box import BoxApp
  from tests.unit.streamalert.apps.test_helpers import get_event, put_mock_params
  from tests.unit.streamalert.shared.test_config import get_mock_lambda_context
label_desc: Use image node_id 16 for calling the TestBoxApp obj's underlying member method code with example usage: obj.test_gather_logs_requests_timeout_retry_success(log_mock) without return types