@patch('simple_salesforce.Salesforce')
def test_connection__explicit_api_version(self, mock_sf):
    org_config = Mock()
    proj_config = Mock()
    service_mock = Mock()
    service_mock.client_id = 'TEST'
    proj_config.keychain.get_service.return_value = service_mock
    get_simple_salesforce_connection(proj_config, org_config, api_version='42.0')
    mock_sf.assert_called_once_with(instance_url=org_config.instance_url, session_id=org_config.access_token, version='42.0')
    mock_sf.return_value.headers.setdefault.assert_called_once_with('Sforce-Call-Options', 'client={}'.format(service_mock.client_id))
@patch('simple_salesforce.Salesforce')
def test_connection__explicit_api_version(self, mock_sf):
    org_config = Mock()
    proj_config = Mock()
    service_mock = Mock()
    service_mock.client_id = 'TEST'
    proj_config.keychain.get_service.return_value = service_mock
    get_simple_salesforce_connection(proj_config, org_config, api_version='42.0')
    mock_sf.assert_called_once_with(instance_url=org_config.instance_url, session_id=org_config.access_token, version='42.0')
    mock_sf.return_value.headers.setdefault.assert_called_once_with('Sforce-Call-Options', 'client={}'.format(service_mock.client_id))