title: PIL - The submitted file is empty Test Case
body: <p>I have a file upload which works perfectly, however I want to write a test for it so I did the following....     </p>
  
  <pre><code>   def test_post_ok(self):
  
      image = Image.new('RGB', (100, 100)
      tmp_file = tempfile.NamedTemporaryFile(suffix='.jpg')
      image.save(tmp_file)
      payload = {
          "name": "Test",
          "thumbnail_image": tmp_file
      }
     api = APIClient()
     api.credentials(Authorization='Bearer ' + self.token)
     response = api.post(url, payload, format='multipart')
  </code></pre>
  
  <p>However, the test gives the error...</p>
  
  <pre><code>&lt;PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=1024x768 at 0x108A5DCF8&gt;
  {'thumbnail_image': [u'The submitted file is empty.']}
  </code></pre>
  
  <p>I assume I'm not doing this correctly, if not why?</p>