Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Disable auto sync and refresh in tests
Jakub Draganek3423d22033d8
diff --git a/tests/test_search.py b/tests/test_search.pyindex 907f6f600a..2d5c080624 100644--- a/tests/test_search.py+++ b/tests/test_search.py@@ -1,14 +1,20 @@-from saleor.product.models import Productfrom django.core.urlresolvers import reverse-from decimal import Decimalimport 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.fixturedef indexed_products(product_class, default_category):