File tree Expand file tree Collapse file tree 4 files changed +1
-20
lines changed Expand file tree Collapse file tree 4 files changed +1
-20
lines changed Original file line number Diff line number Diff line change 3939JSON_API_FORMAT_KEYS = 'camelize'
4040JSON_API_FORMAT_RELATION_KEYS = 'camelize'
4141REST_FRAMEWORK = {
42- # 'PAGINATE_BY': 5,
43- # 'PAGINATE_BY_PARAM': 'page_size',
44- # 'MAX_PAGINATE_BY': 100,
4542 'PAGE_SIZE' : 5 ,
46- # 'PAGINATE_BY_PARAM' should now be in the pagination class
47- # Same for 'MAX_PAGINATE_BY'.
4843 'EXCEPTION_HANDLER' : 'rest_framework_json_api.exceptions.exception_handler' ,
4944 'DEFAULT_PAGINATION_CLASS' :
5045 'rest_framework_json_api.pagination.PageNumberPagination' ,
Original file line number Diff line number Diff line change 1313JSON_API_FORMAT_RELATION_KEYS = 'camelize'
1414JSON_API_PLURALIZE_RELATION_TYPE = True
1515REST_FRAMEWORK .update ({
16- # 'PAGINATE_BY': 1,
1716 'PAGE_SIZE' : 1 ,
1817})
Original file line number Diff line number Diff line change @@ -17,19 +17,6 @@ def setUp(self):
1717 super (FormatKeysSetTests , self ).setUp ()
1818 self .detail_url = reverse ('user-detail' , kwargs = {'pk' : self .miles .pk })
1919
20- # Set the format keys settings.
21- # The below line is redundant because the default settings already
22- # use 'camelize'
23- # setattr(settings, 'JSON_API_FORMAT_KEYS', 'camelize')
24- # CAMELIZE capitalize the type, needs to be checked
25-
26- def tearDown (self ):
27- pass
28- # Remove the format keys settings.
29- # The below line is redundant because the default settings already
30- # use 'camelize'
31- # setattr(settings, 'JSON_API_FORMAT_KEYS', 'camelize')
32-
3320
3421 def test_camelization (self ):
3522 """
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ class NonPaginatedEntryViewSet(EntryViewSet):
7171 view = NonPaginatedEntryViewSet .as_view ({'get' : 'list' })
7272 response = view (request )
7373 response .render ()
74- # print response.content
74+
7575 content_dump = redump_json (response .content )
7676 expected_dump = dump_json (expected )
7777
You can’t perform that action at this time.
0 commit comments