Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Clean up

Jakub Draganek823a17f22587
diff --git a/saleor/search/backends/newelastic.py b/saleor/search/backends/newelastic.py
index cf2e37689d..dd76850458 100644
--- a/saleor/search/backends/newelastic.py
+++ b/saleor/search/backends/newelastic.py
@@ -5,9 +5,6 @@ from django.utils.six.moves.urllib.parse import urlparse
from elasticsearch_dsl import Search
from elasticsearch_dsl.query import MultiMatch
-# module scoped elasticsearch client handler for dependency injection
-CLIENT = Elasticsearch()
-
def _make_host_entry(url):
use_ssl = url.scheme == 'https'
diff --git a/saleor/search/backends/test_newelastic.py b/saleor/search/backends/test_newelastic.py
index 9e79cf98e7..e2affa05b7 100644
--- a/saleor/search/backends/test_newelastic.py
+++ b/saleor/search/backends/test_newelastic.py
@@ -45,4 +45,3 @@ def test_storefront_product_search_query_syntax(elasticsearch_client):
products = newelastic.search_products(PHRASE)
newelastic.SearchBackend.client.search.assert_called_once_with(
body=QUERY, doc_type=[], index=[INDEX])
- assert not products