myapp.tests.test_views module
- class
myapp.tests.test_views.
DJATestCase
(methodName='runTest') Bases:
rest_framework.test.APITestCase
test cases using Django REST Framework drf-json-api (DJA)
test_post_primary_rel
()I should be able to POST the primary data and relationships together.
test_patch_primary_rel
()Make sure we can PATCH the attributes and relationships
test_patch_rel
()See https://jsonapi.org/format/#crud-updating-resource-relationships
test_page_size
()test rest_framework_json_api.pagination.JsonApiPageNumberPagination: page[size] and page[number]
test_filter_search
()test keyword search (rest_framework.filters.SearchFilter): filter[all]=keywords
test_filter_fields
()test field search (django_filters.rest_framework.DjangoFilterBackend): filter[<field>]=values
test_filter_fields_union_list
()test field for a list of values (ORed): ?filter[field.in]=ANTB,BIOB,XXXX
test_filter_fields_intersection
()test fields (ANDed): ?filter[subject_area_code]=ANTB&filter[course_number]=1234
test_sparse_fieldsets
()test sparse fieldsets
test_sort
()test sort
test_sort_badfield
()test sort of nonexistent field
test_include
()test include
test_related_course_course_terms
()test toMany relationship and related links for courses.related.course_terms
test_related_course_terms_course
()test toOne relationship and related links for course_terms.related.course
test_permission_course_course_terms
()See if permissions are correctly implemented.
test_permission_course_terms
()confirm that somebody lacks course_terms view permission