1
Django separates uploaded files from other submitted data. The tags
key exits in request.POST
, but image
should be in request.FILES
. From what I can see, what you’re doing is the correct way to test file upload with the test client.
Source:stackexchange.com