We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 977e70b commit 3b6c12dCopy full SHA for 3b6c12d
example/tests/test_views.py
@@ -143,6 +143,18 @@ def test_patch_one_to_many_relationship(self):
143
response = self.client.get(url)
144
assert response.data == request_data['data']
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
157
158
def test_patch_many_to_many_relationship(self):
159
url = '/entries/{}/relationships/authors'.format(self.first_entry.id)
160
request_data = {
0 commit comments