class_docstr: Test class for the SalesforceApp
class_docstr_tok: ["Test","class","for","the","SalesforceApp"]
docstr: SalesforceApp - Gather event logs
docstr_tok: ["SalesforceApp","-","Gather","event","logs"]
code: def test_gather_logs(self, mock_post, mock_get):
      """SalesforceApp - Gather event logs"""
      self.set_config_values(
          "CLIENT_ID",
          "CLIENT_SECRET",
          "USERNAME",
          "PASSWORD",
          "SECURITY_TOKEN",
      )
      self._app._instance_url = "MY_URL"
  
      mock_post.return_value = Mock(
          status_code=200,
          json=Mock(
              return_value={
                  "access_token": "AUTH_TOKEN",
                  "instance_url": "MY_URL",
              }
          ),
      )
  
      mock_get.return_value = Mock(
          status_code=200,
          json=Mock(
              side_effect=[
                  list_salesforce_api_versions(),
                  get_salesforce_log_files(),
                  ValueError,
                  ValueError,
              ]
          ),
          text="key1,key2\nvalue1a,value2a\nvalue1b,value2b",
      )
  
      assert_equal(len(self._app._gather_logs()), 4)
  
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 20 for calling the TestSalesforceApp obj's underlying member method code with example usage: obj.test_gather_logs(mock_post, mock_get) without return types