mirror of
https://github.com/django/django.git
synced 2025-07-28 15:44:20 +00:00
Refs #33308 -- Ensured type handlers are registered for all PostgreSQL specific tests.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
This commit is contained in:
parent
3cafb783f3
commit
149b55fefa
11 changed files with 12 additions and 35 deletions
|
@ -7,7 +7,6 @@ transcript.
|
|||
"""
|
||||
from django.db import connection
|
||||
from django.db.models import F, Value
|
||||
from django.test import modify_settings
|
||||
|
||||
from . import PostgreSQLSimpleTestCase, PostgreSQLTestCase
|
||||
from .models import Character, Line, LineSavedSearch, Scene
|
||||
|
@ -103,7 +102,6 @@ class GrailTestData:
|
|||
)
|
||||
|
||||
|
||||
@modify_settings(INSTALLED_APPS={"append": "django.contrib.postgres"})
|
||||
class SimpleSearchTest(GrailTestData, PostgreSQLTestCase):
|
||||
def test_simple(self):
|
||||
searched = Line.objects.filter(dialogue__search="elbows")
|
||||
|
@ -140,7 +138,6 @@ class SimpleSearchTest(GrailTestData, PostgreSQLTestCase):
|
|||
self.assertSequenceEqual(searched, [match])
|
||||
|
||||
|
||||
@modify_settings(INSTALLED_APPS={"append": "django.contrib.postgres"})
|
||||
class SearchVectorFieldTest(GrailTestData, PostgreSQLTestCase):
|
||||
def test_existing_vector(self):
|
||||
Line.objects.update(dialogue_search_vector=SearchVector("dialogue"))
|
||||
|
@ -339,7 +336,6 @@ class MultipleFieldsTest(GrailTestData, PostgreSQLTestCase):
|
|||
self.assertSequenceEqual(searched, [self.french])
|
||||
|
||||
|
||||
@modify_settings(INSTALLED_APPS={"append": "django.contrib.postgres"})
|
||||
class TestCombinations(GrailTestData, PostgreSQLTestCase):
|
||||
def test_vector_add(self):
|
||||
searched = Line.objects.annotate(
|
||||
|
@ -462,7 +458,6 @@ class TestCombinations(GrailTestData, PostgreSQLTestCase):
|
|||
Line.objects.filter(dialogue__search=None & SearchQuery("kneecaps"))
|
||||
|
||||
|
||||
@modify_settings(INSTALLED_APPS={"append": "django.contrib.postgres"})
|
||||
class TestRankingAndWeights(GrailTestData, PostgreSQLTestCase):
|
||||
def test_ranking(self):
|
||||
searched = (
|
||||
|
@ -661,7 +656,6 @@ class SearchQueryTests(PostgreSQLSimpleTestCase):
|
|||
self.assertEqual(str(query), expected_str)
|
||||
|
||||
|
||||
@modify_settings(INSTALLED_APPS={"append": "django.contrib.postgres"})
|
||||
class SearchHeadlineTests(GrailTestData, PostgreSQLTestCase):
|
||||
def test_headline(self):
|
||||
searched = Line.objects.annotate(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue