Skip to content

Commit 6021bd3

Browse files
committed
Update o2m test to call PATCH twice and verify that its behavior isn't broken
1 parent 49128db commit 6021bd3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

example/tests/test_views.py

+7
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,13 @@ def test_patch_one_to_many_relationship(self):
135135
response = self.client.get(url)
136136
assert response.data == request_data['data']
137137

138+
response = self.client.patch(url, data=request_data)
139+
assert response.status_code == 200, response.content.decode()
140+
assert response.data == request_data['data']
141+
142+
response = self.client.get(url)
143+
assert response.data == request_data['data']
144+
138145
def test_patch_many_to_many_relationship(self):
139146
url = '/entries/{}/relationships/authors'.format(self.first_entry.id)
140147
request_data = {

0 commit comments

Comments
 (0)