def METHOD_NAME(mocker):
    class ElasticsearchMock:
        def search(self, index, body):
            return {'hits': {'hits': [{'_source': {'yo': 'la'}}]}}
    module = 'toucan_connectors.elasticsearch.elasticsearch_connector'
    mock_es = mocker.patch(f'{module}.Elasticsearch')
    mock_es.return_value = ElasticsearchMock()
    con = ElasticsearchConnector(
        name='test',
        hosts=[
            {
                'url': 'https://toto.com/lu',
                'username': 'test',
                'scheme': 'https',
                'password': 'pikapika',
                'headers': {'truc': ''},
            }
        ],
    )
    ds = ElasticsearchDataSource(
        domain='test', name='test', index='_all', search_method='search', body={'_source': True}
    )
    con.get_df(ds)
    mock_es.assert_called_once_with(
        [
            {
                'host': 'toto.com',
                'url_prefix': '/lu',
                'port': 443,
                'use_ssl': True,
                'scheme': 'https',
                'http_auth': 'test:pikapika',
                'headers': {'truc': ''},
            }
        ],
    )