@@ -40,7 +40,8 @@ def setUp(self):
40
40
)
41
41
42
42
def test_attribute_rendering_strategy (self ):
43
- with override_settings (JSON_API_NESTED_SERIALIZERS_RENDERING_STRATEGY = ATTRIBUTE_RENDERING_STRATEGY ):
43
+ with override_settings (
44
+ JSON_API_NESTED_SERIALIZERS_RENDERING_STRATEGY = ATTRIBUTE_RENDERING_STRATEGY ):
44
45
response = self .client .get (self .list_url )
45
46
46
47
expected = {
@@ -81,7 +82,8 @@ def test_attribute_rendering_strategy(self):
81
82
assert expected == response .json ()
82
83
83
84
def test_relations_rendering_strategy (self ):
84
- with override_settings (JSON_API_NESTED_SERIALIZERS_RENDERING_STRATEGY = RELATIONS_RENDERING_STRATEGY ):
85
+ with override_settings (
86
+ JSON_API_NESTED_SERIALIZERS_RENDERING_STRATEGY = RELATIONS_RENDERING_STRATEGY ):
85
87
response = self .client .get (self .list_url )
86
88
87
89
expected = {
@@ -122,14 +124,15 @@ def test_relations_rendering_strategy(self):
122
124
assert expected == response .json ()
123
125
124
126
def test_relations_rendering_strategy_included (self ):
125
- with override_settings (JSON_API_NESTED_SERIALIZERS_RENDERING_STRATEGY = RELATIONS_RENDERING_STRATEGY ):
127
+ with override_settings (
128
+ JSON_API_NESTED_SERIALIZERS_RENDERING_STRATEGY = RELATIONS_RENDERING_STRATEGY ):
126
129
response = self .client .get (self .list_url , data = {'include' : 'comments,comments.entry' })
127
130
128
131
expected = {
129
132
"links" : {
130
- "first" : "http://testserver/authors-nested?include=comments%2Ccomments.entry&page%5Bnumber%5D=1" ,
131
- "last" : "http://testserver/authors-nested?include=comments%2Ccomments.entry&page%5Bnumber%5D=5" ,
132
- "next" : "http://testserver/authors-nested?include=comments%2Ccomments.entry&page%5Bnumber%5D=2" ,
133
+ "first" : "http://testserver/authors-nested?include=comments%2Ccomments.entry&page%5Bnumber%5D=1" , # NoQA
134
+ "last" : "http://testserver/authors-nested?include=comments%2Ccomments.entry&page%5Bnumber%5D=5" , # NoQA
135
+ "next" : "http://testserver/authors-nested?include=comments%2Ccomments.entry&page%5Bnumber%5D=2" , # NoQA
133
136
"prev" : None
134
137
},
135
138
"data" : [
0 commit comments