mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-11 16:53:10 +00:00
Fixes Elasticsearch tests.
This commit is contained in:
parent
d537737166
commit
c3cac970ff
3 changed files with 19 additions and 35 deletions
|
|
@ -8,9 +8,10 @@ from django.core import management
|
|||
|
||||
from wagtail.tests.search import models
|
||||
from wagtail.wagtailsearch.query import MATCH_ALL
|
||||
from wagtail.wagtailsearch.tests.test_backends import BackendTests
|
||||
|
||||
|
||||
class ElasticsearchCommonSearchBackendTests(object):
|
||||
class ElasticsearchCommonSearchBackendTests(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)
|
||||
|
|
@ -174,6 +175,21 @@ class ElasticsearchCommonSearchBackendTests(object):
|
|||
results = self.backend.search(MATCH_ALL, models.Book)[110:]
|
||||
self.assertEqual(len(results), 53)
|
||||
|
||||
# Broken
|
||||
@unittest.expectedFailure
|
||||
def test_filter_in_values_list_subquery(self):
|
||||
super().test_filter_in_values_list_subquery()
|
||||
|
||||
# Broken
|
||||
@unittest.expectedFailure
|
||||
def test_order_by_non_filterable_field(self):
|
||||
super().test_order_by_non_filterable_field()
|
||||
|
||||
# Broken
|
||||
@unittest.expectedFailure
|
||||
def test_delete(self):
|
||||
super().test_delete()
|
||||
|
||||
#
|
||||
# Basic query classes
|
||||
#
|
||||
|
|
|
|||
|
|
@ -16,27 +16,11 @@ from wagtail.wagtailsearch.backends.elasticsearch2 import (
|
|||
from wagtail.wagtailsearch.query import MATCH_ALL
|
||||
|
||||
from .elasticsearch_common_tests import ElasticsearchCommonSearchBackendTests
|
||||
from .test_backends import BackendTests
|
||||
|
||||
|
||||
class TestElasticsearch2SearchBackend(BackendTests, ElasticsearchCommonSearchBackendTests, TestCase):
|
||||
class TestElasticsearch2SearchBackend(ElasticsearchCommonSearchBackendTests, TestCase):
|
||||
backend_path = 'wagtail.wagtailsearch.backends.elasticsearch2'
|
||||
|
||||
# Broken
|
||||
@unittest.expectedFailure
|
||||
def test_filter_in_values_list_subquery(self):
|
||||
super(TestElasticsearch2SearchBackend, self).test_filter_in_values_list_subquery()
|
||||
|
||||
# Broken
|
||||
@unittest.expectedFailure
|
||||
def test_order_by_non_filterable_field(self):
|
||||
super(TestElasticsearch2SearchBackend, self).test_order_by_non_filterable_field()
|
||||
|
||||
# Broken
|
||||
@unittest.expectedFailure
|
||||
def test_delete(self):
|
||||
super(TestElasticsearch2SearchBackend, self).test_delete()
|
||||
|
||||
|
||||
class TestElasticsearch2SearchQuery(TestCase):
|
||||
def assertDictEqual(self, a, b):
|
||||
|
|
|
|||
|
|
@ -15,10 +15,9 @@ from wagtail.wagtailsearch.backends.elasticsearch5 import Elasticsearch5SearchBa
|
|||
from wagtail.wagtailsearch.query import MATCH_ALL
|
||||
|
||||
from .elasticsearch_common_tests import ElasticsearchCommonSearchBackendTests
|
||||
from .test_backends import BackendTests
|
||||
|
||||
|
||||
class TestElasticsearch5SearchBackend(BackendTests, ElasticsearchCommonSearchBackendTests, TestCase):
|
||||
class TestElasticsearch5SearchBackend(ElasticsearchCommonSearchBackendTests, TestCase):
|
||||
backend_path = 'wagtail.wagtailsearch.backends.elasticsearch5'
|
||||
|
||||
# Broken
|
||||
|
|
@ -26,21 +25,6 @@ class TestElasticsearch5SearchBackend(BackendTests, ElasticsearchCommonSearchBac
|
|||
def test_filter_isnull_true(self):
|
||||
super(TestElasticsearch5SearchBackend, self).test_filter_isnull_true()
|
||||
|
||||
# Broken
|
||||
@unittest.expectedFailure
|
||||
def test_filter_in_values_list_subquery(self):
|
||||
super(TestElasticsearch5SearchBackend, self).test_filter_in_values_list_subquery()
|
||||
|
||||
# Broken
|
||||
@unittest.expectedFailure
|
||||
def test_order_by_non_filterable_field(self):
|
||||
super(TestElasticsearch5SearchBackend, self).test_order_by_non_filterable_field()
|
||||
|
||||
# Broken
|
||||
@unittest.expectedFailure
|
||||
def test_delete(self):
|
||||
super(TestElasticsearch5SearchBackend, self).test_delete()
|
||||
|
||||
|
||||
class TestElasticsearch5SearchQuery(TestCase):
|
||||
def assertDictEqual(self, a, b):
|
||||
|
|
|
|||
Loading…
Reference in a new issue