Tests the search query API on Elasticsearch.

This commit is contained in:
Bertrand Bordage 2018-01-04 12:14:45 +01:00
parent da4312703b
commit 8e6dedac67

View file

@ -5,10 +5,10 @@ from django.core import management
from wagtail.tests.search import models
from wagtail.search.query import MATCH_ALL
from wagtail.search.tests.test_backends import BackendTests
from wagtail.search.tests.test_backends import BackendTests, QueryAPITestMixin
class ElasticsearchCommonSearchBackendTests(BackendTests):
class ElasticsearchCommonSearchBackendTests(QueryAPITestMixin, BackendTests):
def test_search_with_spaces_only(self):
# Search for some space characters and hope it doesn't crash
results = self.backend.search(" ", models.Book)