mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-11 16:53:10 +00:00
Merges again QueryAPITestMixin and BackendTest.
This commit is contained in:
parent
8e6dedac67
commit
14490978e5
4 changed files with 6 additions and 8 deletions
|
|
@ -1,11 +1,11 @@
|
|||
from django.test import TestCase
|
||||
|
||||
from wagtail.search.tests.test_backends import QueryAPITestMixin, BackendTests
|
||||
from wagtail.search.tests.test_backends import BackendTests
|
||||
|
||||
from ..utils import BOOSTS_WEIGHTS, WEIGHTS_VALUES, determine_boosts_weights, get_weight
|
||||
|
||||
|
||||
class TestPostgresSearchBackend(QueryAPITestMixin, BackendTests, TestCase):
|
||||
class TestPostgresSearchBackend(BackendTests, TestCase):
|
||||
backend_path = 'wagtail.contrib.postgres_search.backend'
|
||||
|
||||
def test_weights(self):
|
||||
|
|
|
|||
|
|
@ -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, QueryAPITestMixin
|
||||
from wagtail.search.tests.test_backends import BackendTests
|
||||
|
||||
|
||||
class ElasticsearchCommonSearchBackendTests(QueryAPITestMixin, BackendTests):
|
||||
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)
|
||||
|
|
|
|||
|
|
@ -431,8 +431,6 @@ class BackendTests(WagtailTestUtils):
|
|||
"The Fellowship of the Ring" # If this item doesn't appear, "Foundation" is still in the index
|
||||
])
|
||||
|
||||
|
||||
class QueryAPITestMixin:
|
||||
#
|
||||
# Basic query classes
|
||||
#
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@ import unittest
|
|||
|
||||
from django.test import TestCase
|
||||
|
||||
from .test_backends import BackendTests, QueryAPITestMixin
|
||||
from .test_backends import BackendTests
|
||||
|
||||
|
||||
class TestDBBackend(QueryAPITestMixin, BackendTests, TestCase):
|
||||
class TestDBBackend(BackendTests, TestCase):
|
||||
backend_path = 'wagtail.search.backends.db'
|
||||
|
||||
# Doesn't support ranking
|
||||
|
|
|
|||
Loading…
Reference in a new issue