title: django.test.Client and response.content vs. streaming_content
body: <p>I have a Django test that accesses a web page using the <a href="https://docs.djangoproject.com/en/1.6/topics/testing/tools/" rel="noreferrer">Django test client</a>.</p>
  
  <p>In one of the tests, the server returns a ZIP file as an attachment. I access the content of the ZIP file with the following code:</p>
  
  <pre><code>zip_content = StringIO(response.content)
  zip = ZipFile(zip_content)
  </code></pre>
  
  <p>This causes the following deprecation warning:</p>
  
  <blockquote>
    <p>D:/Developments/Archaeology/DB/ArtefactDatabase/Webserver\importexport\tests\test_import.py:1: DeprecationWarning: Accessing the <code>content</code> attribute on a streaming response is deprecated. Use the <code>streaming_content</code> attribute instead.`</p>
  </blockquote>
  
  <p><code>response.streaming_content</code> returns some sort of map, which is definitely not a file-like object that's required for <code>ZipFile</code>. How can I use the <code>streaming_content</code> attribute for this? </p>
  
  <p>Incidentally, I only get the deprecation warning when passing <code>response.content</code> to a <code>StringIO</code>, when I access the response.content of an ordinary HTML page, there's no warning.</p>