Scrapy, a fast high-level web crawling & scraping framework for Python.
Redefined test for #193
Ruben Vereecken54434095fc03
diff --git a/scrapy/tests/test_downloadermiddleware_httpcompression.py b/scrapy/tests/test_downloadermiddleware_httpcompression.pyindex 770fa7c33..5fbc2c619 100644--- a/scrapy/tests/test_downloadermiddleware_httpcompression.py+++ b/scrapy/tests/test_downloadermiddleware_httpcompression.py@@ -135,3 +135,12 @@ class HttpCompressionTest(TestCase):self.assertEqual(newresponse.body, plainbody)self.assertEqual(newresponse.encoding, resolve_encoding('gb2312'))+ def test_process_response_gzipped_contenttype(self):+ response = self._getresponse('gzip')+ response.headers['Content-Type'] = 'application/gzip'+ request = response.request++ newresponse = self.mw.process_response(request, response, self.spider)+ self.assertIs(newresponse, response)+ self.assertEqual(response.headers['Content-Encoding'], 'gzip')+ self.assertEqual(response.headers['Content-Type'], 'application/gzip')