django_elasticsearch_dsl_drf.tests package¶
Submodules¶
django_elasticsearch_dsl_drf.tests.base module¶
django_elasticsearch_dsl_drf.tests.data_mixins module¶
Data mixins.
django_elasticsearch_dsl_drf.tests.test_faceted_search module¶
Test faceted search backend.
-
class
django_elasticsearch_dsl_drf.tests.test_faceted_search.
TestFacetedSearch
(methodName='runTest')[source]¶ Bases:
django_elasticsearch_dsl_drf.tests.base.BaseRestFrameworkTestCase
Test faceted search.
-
pytestmark
= [<MarkDecorator 'django_db' {'kwargs': {}, 'args': ()}>, <MarkDecorator 'django_db' {'kwargs': {}, 'args': ()}>]¶
-
django_elasticsearch_dsl_drf.tests.test_filtering_common module¶
Test filtering backend.
-
class
django_elasticsearch_dsl_drf.tests.test_filtering_common.
TestFilteringCommon
(methodName='runTest')[source]¶ Bases:
django_elasticsearch_dsl_drf.tests.base.BaseRestFrameworkTestCase
,django_elasticsearch_dsl_drf.tests.data_mixins.AddressesMixin
,django_elasticsearch_dsl_drf.tests.data_mixins.BooksMixin
Test filtering common.
-
pytestmark
= [<MarkDecorator 'django_db' {'kwargs': {}, 'args': ()}>, <MarkDecorator 'django_db' {'kwargs': {}, 'args': ()}>]¶
-
test_field_filter_gt_with_boost
()[source]¶ Field filter gt with boost.
Example:
http://localhost:8000/api/users/?id__gt=10|2.0Returns:
-
test_field_filter_in
()[source]¶ Test filter in.
Example:
http://localhost:8000/api/articles/?id__in=1|2|3
-
test_field_filter_lt_with_boost
()[source]¶ Field filter lt with boost.
Example:
http://localhost:8000/api/users/?id__lt=10|2.0Returns:
-
test_field_filter_range
()[source]¶ Field filter range.
Example:
http://localhost:8000/api/users/?age__range=16|67
-
test_field_filter_range_with_boost
()[source]¶ Field filter range.
Example:
http://localhost:8000/api/users/?age__range=16|67|2.0
-
test_field_filter_terms_string
()[source]¶ Test filter terms.
Example:
http://localhost:8000/api/articles/?id__terms=1|2|3
-
django_elasticsearch_dsl_drf.tests.test_filtering_geo_spatial module¶
Test geo-spatial filtering backend.
-
class
django_elasticsearch_dsl_drf.tests.test_filtering_geo_spatial.
TestFilteringGeoSpatial
(methodName='runTest')[source]¶ Bases:
django_elasticsearch_dsl_drf.tests.base.BaseRestFrameworkTestCase
Test filtering geo-spatial.
-
pytestmark
= [<MarkDecorator 'django_db' {'kwargs': {}, 'args': ()}>, <MarkDecorator 'django_db' {'kwargs': {}, 'args': ()}>]¶
-
test_field_filter_geo_bounding_box_fail_test
()[source]¶ Test field filter geo-bounding-box (fail test).
Returns:
-
test_field_filter_geo_distance
()[source]¶ Field filter geo-distance.
Example:
http://localhost:8000 /api/publisher/?location__geo_distance=1km|48.8549|2.3000
-
django_elasticsearch_dsl_drf.tests.test_helpers module¶
Test helpers.
django_elasticsearch_dsl_drf.tests.test_ordering_common module¶
Test ordering backend.
-
class
django_elasticsearch_dsl_drf.tests.test_ordering_common.
TestOrdering
(methodName='runTest')[source]¶ Bases:
django_elasticsearch_dsl_drf.tests.base.BaseRestFrameworkTestCase
Test ordering.
-
pytestmark
= [<MarkDecorator 'django_db' {'kwargs': {}, 'args': ()}>, <MarkDecorator 'django_db' {'kwargs': {}, 'args': ()}>]¶
Author order by default.
Order by field name ascending.
Order by field id descending.
Order by field name ascending.
Order by field name descending.
-
django_elasticsearch_dsl_drf.tests.test_ordering_geo_spatial module¶
Test geo-spatial ordering filter backend.
-
class
django_elasticsearch_dsl_drf.tests.test_ordering_geo_spatial.
TestOrderingGeoSpatial
(methodName='runTest')[source]¶ Bases:
django_elasticsearch_dsl_drf.tests.base.BaseRestFrameworkTestCase
Test ordering geo-spatial.
-
pytestmark
= [<MarkDecorator 'django_db' {'kwargs': {}, 'args': ()}>, <MarkDecorator 'django_db' {'kwargs': {}, 'args': ()}>]¶
-
test_field_filter_geo_distance
()[source]¶ Field filter geo_distance.
Example:
http://localhost:8000 /api/publisher/?ordering=location|48.85|2.30|km|plane
-
django_elasticsearch_dsl_drf.tests.test_pagination module¶
Test pagination.
-
class
django_elasticsearch_dsl_drf.tests.test_pagination.
TestPagination
(methodName='runTest')[source]¶ Bases:
django_elasticsearch_dsl_drf.tests.base.BaseRestFrameworkTestCase
Test pagination.
-
pytestmark
= [<MarkDecorator 'django_db' {'kwargs': {}, 'args': ()}>, <MarkDecorator 'django_db' {'kwargs': {}, 'args': ()}>]¶
-
django_elasticsearch_dsl_drf.tests.test_search module¶
Test search backend.
-
class
django_elasticsearch_dsl_drf.tests.test_search.
TestSearch
(methodName='runTest')[source]¶ Bases:
django_elasticsearch_dsl_drf.tests.base.BaseRestFrameworkTestCase
Test search.
-
pytestmark
= [<MarkDecorator 'django_db' {'kwargs': {}, 'args': ()}>, <MarkDecorator 'django_db' {'kwargs': {}, 'args': ()}>]¶
-