Django REST Framework File Upload
This article inspired from same title article by jxstanford on 1.
so, what’s the difference?
One of the main difference is I use JWT Authentication (django-rest-framework-jwt 2) instead of Token Authentication.
so here’s my test.py code
# tests.py from rest_framework import status # from rest_framework.authtoken.models import Token from rest_framework_jwt.settings import api_settings from rest_framework.test import APITestCase from rest_framework.test import APIClient from django.core import serializers from django.core.urlresolvers import reverse from django.core.exceptions import ObjectDoesNotExist from django.