class_docstr: Test class for the SalesforceApp
class_docstr_tok: ["Test","class","for","the","SalesforceApp"]
docstr: SalesforceApp - Validate status code 500
docstr_tok: ["SalesforceApp","-","Validate","status","code","500"]
code: def test_validate_status_code_500(self, mock_post):
      """SalesforceApp - Validate status code 500"""
      resp = Mock(
          status_code=500,
          json=Mock(
              return_value={
                  "message": "error message",
                  "errorCode": "ERROR_CODE",
              }
          ),
      )
      self.set_config_values(
          "CLIENT_ID",
          "CLIENT_SECRET",
          "USERNAME",
          "PASSWORD",
          "SECURITY_TOKEN",
      )
      mock_post.return_value = Mock(
          status_code=200,
          json=Mock(
              return_value={
                  "access_token": "AUTH_TOKEN2",
                  "instance_url": "MY_URL2",
              }
          ),
      )
      self._app._validate_status_code(resp)
  
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 8 for calling the TestSalesforceApp obj's underlying member method code with example usage: obj.test_validate_status_code_500(mock_post) without return types