[Django]-How to post a list with django-restframework testclient

5👍

✅

The default format for Client.post is multipart. You need to specify json using the format parameter:

r = self.client.post(url, data, format='json')

Leave a comment