kopia lustrzana https://github.com/wagtail/wagtail
Refactor Elasticsearch backend classes to drop version 2
rodzic
6e1e36256a
commit
a6a70dff04
Plik diff jest za duży
Load Diff
Plik diff jest za duży
Load Diff
|
@ -1,7 +1,7 @@
|
|||
from .elasticsearch2 import ElasticsearchAutocompleteQueryCompilerImpl
|
||||
from .elasticsearch5 import (
|
||||
Elasticsearch5Index, Elasticsearch5Mapping, Elasticsearch5SearchBackend,
|
||||
Elasticsearch5SearchQueryCompiler, Elasticsearch5SearchResults)
|
||||
Elasticsearch5SearchQueryCompiler, Elasticsearch5SearchResults,
|
||||
ElasticsearchAutocompleteQueryCompilerImpl)
|
||||
|
||||
|
||||
class Elasticsearch6Mapping(Elasticsearch5Mapping):
|
||||
|
|
|
@ -3,7 +3,7 @@ from copy import deepcopy
|
|||
from elasticsearch import NotFoundError
|
||||
from elasticsearch.helpers import bulk
|
||||
|
||||
from wagtail.search.backends.elasticsearch2 import ElasticsearchAutocompleteQueryCompilerImpl
|
||||
from wagtail.search.backends.elasticsearch5 import ElasticsearchAutocompleteQueryCompilerImpl
|
||||
from wagtail.search.backends.elasticsearch6 import (
|
||||
Elasticsearch6Index, Elasticsearch6Mapping, Elasticsearch6SearchBackend,
|
||||
Elasticsearch6SearchQueryCompiler, Elasticsearch6SearchResults)
|
||||
|
|
|
@ -743,7 +743,7 @@ class TestElasticsearch5MappingInheritance(TestCase):
|
|||
self.assertDictEqual(document, expected_result)
|
||||
|
||||
|
||||
@mock.patch('wagtail.search.backends.elasticsearch2.Elasticsearch')
|
||||
@mock.patch('wagtail.search.backends.elasticsearch5.Elasticsearch')
|
||||
class TestBackendConfiguration(TestCase):
|
||||
def test_default_settings(self, Elasticsearch):
|
||||
Elasticsearch5SearchBackend(params={})
|
||||
|
|
|
@ -745,7 +745,7 @@ class TestElasticsearch6MappingInheritance(TestCase):
|
|||
self.assertDictEqual(document, expected_result)
|
||||
|
||||
|
||||
@mock.patch('wagtail.search.backends.elasticsearch2.Elasticsearch')
|
||||
@mock.patch('wagtail.search.backends.elasticsearch5.Elasticsearch')
|
||||
class TestBackendConfiguration(TestCase):
|
||||
def test_default_settings(self, Elasticsearch):
|
||||
Elasticsearch6SearchBackend(params={})
|
||||
|
|
|
@ -741,7 +741,7 @@ class TestElasticsearch7MappingInheritance(TestCase):
|
|||
self.assertDictEqual(document, expected_result)
|
||||
|
||||
|
||||
@mock.patch('wagtail.search.backends.elasticsearch2.Elasticsearch')
|
||||
@mock.patch('wagtail.search.backends.elasticsearch5.Elasticsearch')
|
||||
class TestBackendConfiguration(TestCase):
|
||||
def test_default_settings(self, Elasticsearch):
|
||||
Elasticsearch7SearchBackend(params={})
|
||||
|
|
Ładowanie…
Reference in New Issue