diff options
| author | Hannes Ljungberg <hannes@5monkeys.se> | 2019-11-19 14:59:06 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-03-03 15:39:52 +0100 |
| commit | 65ab4f9f03e70733df6afd9d8454ec3700155111 (patch) | |
| tree | 4c296df9faab1f796ca22ea10a892d93baa27774 /tests/postgres_tests/test_trigram.py | |
| parent | aee0bebc2faf9c6de8211b05d5f1281dc016084f (diff) | |
Fixed #31147 -- Added SearchHeadline to django.contrib.postgres.
Diffstat (limited to 'tests/postgres_tests/test_trigram.py')
| -rw-r--r-- | tests/postgres_tests/test_trigram.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/postgres_tests/test_trigram.py b/tests/postgres_tests/test_trigram.py index 2a123faa5e..19ac4cee31 100644 --- a/tests/postgres_tests/test_trigram.py +++ b/tests/postgres_tests/test_trigram.py @@ -1,9 +1,13 @@ -from django.contrib.postgres.search import TrigramDistance, TrigramSimilarity from django.test import modify_settings from . import PostgreSQLTestCase from .models import CharFieldModel, TextFieldModel +try: + from django.contrib.postgres.search import TrigramDistance, TrigramSimilarity +except ImportError: + pass + @modify_settings(INSTALLED_APPS={'append': 'django.contrib.postgres'}) class TrigramTest(PostgreSQLTestCase): |
