Skip to content

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

Disable auto sync and refresh in tests

Jakub Draganek3423d22033d8
diff --git a/tests/test_search.py b/tests/test_search.py
index 907f6f600a..2d5c080624 100644
--- a/tests/test_search.py
+++ b/tests/test_search.py
@@ -1,14 +1,20 @@
-
from saleor.product.models import Product
from django.core.urlresolvers import reverse
-
from decimal import Decimal
import pytest
+
MATCH_SEARCH_REQUEST = ['method', 'host', 'port', 'path', 'body']
NEW_BACKEND_FOUND = {15, 34, 58} # same as in recorded data!
PRODUCTS_INDEXED = NEW_BACKEND_FOUND
+
[email protected](scope='function', autouse=True)
+def es_autosync_disabled(settings):
+ settings.ELASTICSEARCH_DSL_AUTO_REFRESH = False
+ settings.ELASTICSEARCH_DSL_AUTOSYNC = False
+
+
@pytest.mark.vcr()
@pytest.fixture
def indexed_products(product_class, default_category):