Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Stub postgresql search backend integration
Jakub Draganek68f2edba4b8e
diff --git a/saleor/search/backends/postgresql.py b/saleor/search/backends/postgresql.pyindex 7850eab619..ebdae2b7bf 100644--- a/saleor/search/backends/postgresql.py+++ b/saleor/search/backends/postgresql.py@@ -1,3 +1,5 @@+from ...product.models import Product+def search(phrase):- pass+ return Product.objects.none()diff --git a/tests/test_postgresql_search.py b/tests/test_postgresql_search.pynew file mode 100644index 0000000000..674121d4fd--- /dev/null+++ b/tests/test_postgresql_search.py@@ -0,0 +1,17 @@+from __future__ import unicode_literals++from django.core.urlresolvers import reverse+import pytest++[email protected](scope='function', autouse=True)+def postgresql_search_enabled(settings):+ settings.ELASTICSEARCH_URL = None+ settings.ENABLE_SEARCH = True+ settings.PREFER_DB_SEARCH = True+++def test_dummy_integration(client):+ phrase = 'foo'+ client.get(reverse('search:search'), {'q': phrase})