We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7861ff commit af54109Copy full SHA for af54109
example/tests/test_generic_viewset.py
@@ -3,7 +3,6 @@
3
4
from example.tests import TestBase
5
6
-
7
@override_settings(JSON_API_FORMAT_FIELD_NAMES='dasherize')
8
class GenericViewSet(TestBase):
9
"""
@@ -114,7 +113,6 @@ def test_custom_validation_exceptions(self):
114
113
}
115
116
})
117
118
assert expected == response.json()
119
120
def test_validation_exceptions_with_included(self):
@@ -128,7 +126,7 @@ def test_validation_exceptions_with_included(self):
128
126
},
129
127
'detail': 'This field is required.',
130
131
- response = self.client.post('/entries', dump_json({
+ response = self.client.post('/entries', {
132
'data': {
133
'type': 'posts',
134
'id': 1,
@@ -169,7 +167,7 @@ def test_validation_exceptions_with_included(self):
169
167
170
168
171
]
172
- }), content_type='application/vnd.api+json')
+ })
173
174
- assert expected_error in json.loads(response.content)['errors']
+ assert expected_error in response.json()['errors']
175
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments