File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 11import json
22
3- from example .tests import TestBase
4-
53from django .contrib .auth import get_user_model
64from django .utils import encoding
75from django .core .urlresolvers import reverse
8- from django .conf import settings
6+
7+ from example .tests import TestBase
98
109
1110class ModelViewSetTests (TestBase ):
@@ -167,7 +166,7 @@ def test_key_in_post(self):
167166 }
168167 }
169168 data_attributes = data ['data' ]['attributes' ]
170- response = self .client .put (self .detail_url , data = data , format = ' json' )
169+ response = self .client .put (self .detail_url , content_type = 'application/vnd.api+json' , data = json . dumps ( data ) )
171170
172171 result = json .loads (response .content .decode ('utf8' ))
173172 result_attributes = result ['data' ]['attributes' ]
You can’t perform that action at this time.
0 commit comments