File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,18 @@ def test_patch_one_to_many_relationship(self):
143
143
response = self .client .get (url )
144
144
assert response .data == request_data ['data' ]
145
145
146
+ def test_patch_one_to_many_relaitonship_with_none (self ):
147
+ url = '/blogs/{}/relationships/entry_set' .format (self .first_entry .id )
148
+ request_data = {
149
+ 'data' : None
150
+ }
151
+ response = self .client .patch (url , data = request_data )
152
+ assert response .status_code == 200 , response .content .decode ()
153
+ assert response .data == []
154
+
155
+ response = self .client .get (url )
156
+ assert response .data == []
157
+
146
158
def test_patch_many_to_many_relationship (self ):
147
159
url = '/entries/{}/relationships/authors' .format (self .first_entry .id )
148
160
request_data = {
You can’t perform that action at this time.
0 commit comments