|
1 | 1 | # -*- coding: utf-8 -*- |
2 | | -from __future__ import print_function |
3 | | -from __future__ import unicode_literals |
| 2 | +from __future__ import print_function, unicode_literals |
| 3 | + |
4 | 4 | import datetime |
5 | | -from decimal import Decimal |
6 | | -import os |
7 | 5 | import logging as std_logging |
8 | | - |
9 | | -from mock import patch |
| 6 | +import os |
| 7 | +from decimal import Decimal |
10 | 8 |
|
11 | 9 | import pysolr |
12 | | - |
13 | 10 | from django.conf import settings |
14 | 11 | from django.test import TestCase |
15 | | -from haystack import connections, reset_search_queries |
16 | | -from haystack import indexes |
17 | | -from haystack.inputs import AutoQuery, AltParser, Raw |
| 12 | +from django.utils.unittest import skipIf |
| 13 | +from mock import patch |
| 14 | + |
| 15 | +from core.models import AFourthMockModel, AnotherMockModel, ASixthMockModel, MockModel |
| 16 | +from core.tests.mocks import MockSearchResult |
| 17 | +from haystack import connections, indexes, reset_search_queries |
| 18 | +from haystack.inputs import AltParser, AutoQuery, Raw |
18 | 19 | from haystack.models import SearchResult |
19 | | -from haystack.query import SearchQuerySet, RelatedSearchQuerySet, SQ |
| 20 | +from haystack.query import RelatedSearchQuerySet, SearchQuerySet, SQ |
20 | 21 | from haystack.utils.loading import UnifiedIndex |
21 | | -from core.models import (MockModel, AnotherMockModel, |
22 | | - AFourthMockModel, ASixthMockModel) |
23 | | -from core.tests.mocks import MockSearchResult |
24 | 22 |
|
25 | 23 | test_pickling = True |
26 | 24 |
|
@@ -1313,6 +1311,7 @@ def test_boost(self): |
1313 | 1311 | ]) |
1314 | 1312 |
|
1315 | 1313 |
|
| 1314 | +@skipIf(pysolr.__version__ < (3, 1, 1), 'content extraction requires pysolr > 3.1.0') |
1316 | 1315 | class LiveSolrContentExtractionTestCase(TestCase): |
1317 | 1316 | def setUp(self): |
1318 | 1317 | super(LiveSolrContentExtractionTestCase, self).setUp() |
|
0 commit comments