myapp.tests.test_views module¶
-
class
myapp.tests.test_views.
DJATestCase
(methodName='runTest')[source]¶ Bases:
rest_framework.test.APITestCase
test cases using Django REST Framework drf-json-api (DJA)
-
test_post_primary_rel
()[source]¶ I should be able to POST the primary data and relationships together.
-
test_patch_rel
()[source]¶ See https://jsonapi.org/format/#crud-updating-resource-relationships
-
test_page_size
()[source]¶ test rest_framework_json_api.pagination.JsonApiPageNumberPagination: page[size] and page[number]
-
test_filter_search
()[source]¶ test keyword search (rest_framework.filters.SearchFilter): filter[all]=keywords
-
test_filter_fields
()[source]¶ test field search (django_filters.rest_framework.DjangoFilterBackend): filter[<field>]=values
-
test_filter_fields_union_list
()[source]¶ test field for a list of values (ORed): ?filter[field.in]=ANTB,BIOB,XXXX
-
test_filter_fields_intersection
()[source]¶ test fields (ANDed): ?filter[subject_area_code]=ANTB&filter[course_number]=1234
test toMany relationship and related links for courses.related.course_terms
test toOne relationship and related links for course_terms.related.course
-