class_docstr: Test class for the SalesforceApp
class_docstr_tok: ["Test","class","for","the","SalesforceApp"]
docstr: SalesforceApp - Failed to get latest api versions
docstr_tok: ["SalesforceApp","-","Failed","to","get","latest","api","versions"]
code: def test_get_latest_api_version_request_failed(
      self, mock_get, mock_logger
  ):
      """SalesforceApp - Failed to get latest api versions"""
      mock_get.return_value = Mock(
          status_code=204,
          json=Mock(
              return_value={
                  "errorCode": "ERROR_CODE",
                  "message": "error message",
              }
          ),
      )
      self._app._instance_url = "my_instance_url"
      assert_false(self._app._get_latest_api_version())
      mock_logger.assert_called_with(
          "Failed to fetch lastest api version"
      )
  
      mock_get.return_value = Mock(
          status_code=200, json=Mock(return_value=[{"foo": "bar"}])
      )
      self._app._instance_url = "my_instance_url"
      assert_false(self._app._get_latest_api_version())
      mock_logger.assert_called_with(
          "Failed to obtain latest API version"
      )
  
imports: import os
  from mock import Mock, patch
  from moto import mock_ssm
  from nose.tools import assert_equal, assert_false, assert_true, assert_count_equal, raises
  from requests.exceptions import Timeout
  from streamalert.apps._apps.salesforce import SalesforceApp, SalesforceAppError
  from tests.unit.streamalert.apps.test_helpers import get_event, get_salesforce_log_files, list_salesforce_api_versions, put_mock_params
  from tests.unit.streamalert.shared.test_config import get_mock_lambda_context
label_desc: Use image node_id 15 for calling the TestSalesforceApp obj's underlying member method code with example usage: obj.test_get_latest_api_version_request_failed(mock_get, mock_logger) without return types