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 39
39
JSON_API_FORMAT_KEYS = 'camelize'
40
40
JSON_API_FORMAT_RELATION_KEYS = 'camelize'
41
41
REST_FRAMEWORK = {
42
- # 'PAGINATE_BY': 5,
43
- # 'PAGINATE_BY_PARAM': 'page_size',
44
- # 'MAX_PAGINATE_BY': 100,
45
42
'PAGE_SIZE' : 5 ,
46
- # 'PAGINATE_BY_PARAM' should now be in the pagination class
47
- # Same for 'MAX_PAGINATE_BY'.
48
43
'EXCEPTION_HANDLER' : 'rest_framework_json_api.exceptions.exception_handler' ,
49
44
'DEFAULT_PAGINATION_CLASS' :
50
45
'rest_framework_json_api.pagination.PageNumberPagination' ,
Original file line number Diff line number Diff line change 13
13
JSON_API_FORMAT_RELATION_KEYS = 'camelize'
14
14
JSON_API_PLURALIZE_RELATION_TYPE = True
15
15
REST_FRAMEWORK .update ({
16
- # 'PAGINATE_BY': 1,
17
16
'PAGE_SIZE' : 1 ,
18
17
})
Original file line number Diff line number Diff line change @@ -17,19 +17,6 @@ def setUp(self):
17
17
super (FormatKeysSetTests , self ).setUp ()
18
18
self .detail_url = reverse ('user-detail' , kwargs = {'pk' : self .miles .pk })
19
19
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
-
33
20
34
21
def test_camelization (self ):
35
22
"""
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ class NonPaginatedEntryViewSet(EntryViewSet):
71
71
view = NonPaginatedEntryViewSet .as_view ({'get' : 'list' })
72
72
response = view (request )
73
73
response .render ()
74
- # print response.content
74
+
75
75
content_dump = redump_json (response .content )
76
76
expected_dump = dump_json (expected )
77
77
You can’t perform that action at this time.
0 commit comments